use of org.mifos.test.acceptance.loan.QuestionGroupHelper in project head by mifos.
the class QuestionGroupLoanAccountTest method verifyKeyFinderInQuestionary.
@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyKeyFinderInQuestionary() {
NavigationHelper navigationHelper = new NavigationHelper(selenium);
QuestionGroupHelper questionGroupHelper = new QuestionGroupHelper(navigationHelper);
Random random = new Random();
boolean keyUnpressed = true;
boolean keyPressed = false;
String questionGroupTitle = "QG1" + random.nextInt(100);
String question1 = "DT_6245";
String choiceAnswer1 = "choiceTest13242";
String choiceAnswer2 = "choiceTest34003";
List<String> tag1 = new ArrayList<String>();
List<String> tag2 = new ArrayList<String>();
tag1.add("tag");
tag2.add("tag1");
questionGroupHelper.createQuestionGroupSmart(questionGroupTitle, "Create Loan", question1, choiceAnswer1, choiceAnswer2, tag1, tag2);
loanProductTestHelper.editLoanProductIncludeQuestionsGroups("ClientEmergencyLoan", questionGroupTitle);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("ClientWithLoan 20110221");
searchParameters.setLoanProduct("ClientEmergencyLoan");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1012.0");
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountEntryPage createLoanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
createLoanAccountEntryPage.submitAndNavigateToQuestionResponsePage();
searchParameters.setSearchString("ClientWithLoan 20110221");
Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyUnpressed), true);
Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), false);
createLoanAccountEntryPage.setInputFilterChoices("2");
Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), true);
navigationHelper.navigateToAdminPage().navigateToViewAllQuestions().navigateToQuestionDetail(question1).navigateToEditQuestionPage().deactivate();
}
use of org.mifos.test.acceptance.loan.QuestionGroupHelper in project head by mifos.
the class DefineNewLoanProductTest method setUp.
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
@Override
public void setUp() throws Exception {
super.setUp();
questionGroupHelper = new QuestionGroupHelper(new NavigationHelper(selenium));
random = new Random();
}
Aggregations