use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class ViewReportsTest method loginAndGoToAdminPage.
private AdminPage loginAndGoToAdminPage() {
HomePage homePage = appLauncher.launchMifos().loginSuccessfullyUsingDefaultCredentials();
homePage.verifyPage();
AdminPage adminPage = homePage.navigateToAdminPage();
adminPage.verifyPage();
return adminPage;
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class CenterTest method verifyAcceptedPaymentTypesForCenter.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-246
@Test(enabled = true)
public void verifyAcceptedPaymentTypesForCenter() throws Exception {
// When
CreateCenterEnterDataPage.SubmitFormParameters formParameters = new CreateCenterEnterDataPage.SubmitFormParameters();
String testCenterName = "Center" + StringUtil.getRandomString(6);
formParameters.setCenterName(testCenterName);
formParameters.setLoanOfficer("loan officer");
MeetingParameters meeting = new MeetingParameters();
meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(2));
meeting.setWeekFrequency("1");
meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
formParameters.setMeeting(meeting);
centerTestHelper.createCenter(formParameters, "MyOfficeDHMFT");
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.VOUCHER);
ApplyPaymentPage applyPaymentPage = navigationHelper.navigateToCenterViewDetailsPage(testCenterName).navigateToViewCenterChargesDetailPage().navigateToApplyPayments();
// Then
applyPaymentPage.verifyModeOfPayments();
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class ClientTest method createQuestionGroup.
private void createQuestionGroup() {
Random random = new Random();
questionGroupTitle = "QG1" + random.nextInt(100);
question1 = "FT_" + random.nextInt(100);
question2 = "MS_" + random.nextInt(100);
response = "Hello World";
AdminPage adminPage = navigationHelper.navigateToAdminPage();
CreateQuestionPage createQuestionPage = adminPage.navigateToCreateQuestionPage();
createQuestionPage.addQuestion(getCreateQuestionParams(question1, "Free Text", null));
createQuestionPage.addQuestion(getCreateQuestionParams(question2, MULTI_SELECT, asList("Choice1", "Choice2", "Choice3", "Choice4")));
adminPage = createQuestionPage.submitQuestions();
CreateQuestionGroupPage createQuestionGroupPage = adminPage.navigateToCreateQuestionGroupPage();
CreateQuestionGroupParameters parameters;
parameters = questionGroupTestHelper.getCreateQuestionGroupParameters(questionGroupTitle, asList(question1), "View Client", "Section1");
for (String section : parameters.getExistingQuestions().keySet()) {
createQuestionGroupPage.addExistingQuestion(section, parameters.getExistingQuestions().get(section));
}
createQuestionGroupPage.markEveryOtherQuestionsMandatory(asList(question1));
parameters = questionGroupTestHelper.getCreateQuestionGroupParameters(questionGroupTitle, asList(question2), "View Client", "Section2");
for (String section : parameters.getExistingQuestions().keySet()) {
createQuestionGroupPage.addExistingQuestion(section, parameters.getExistingQuestions().get(section));
}
createQuestionGroupPage.submit(parameters);
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class FeeTestHelper method defineFees.
public void defineFees(FeesCreatePage.SubmitFormParameters feeParameters) {
AdminPage adminPage = navigationHelper.navigateToAdminPage();
adminPage.defineNewFees(feeParameters);
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class FundTest method createViewAndEditFundTest.
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public //http://mifosforge.jira.com/browse/MIFOSTEST-703
void createViewAndEditFundTest() throws Exception {
//When
AdminPage adminPage = loginAndNavigateToAdminPage();
adminPage.verifyPage();
FundCreatePage fundCreatePage = adminPage.navigateToFundCreatePage();
CreateFundSubmitParameters submitParameters = new CreateFundSubmitParameters();
submitParameters.setFundCode("01");
submitParameters.setFundName("aaa");
CreateNewFundConfirmationPage confirmationPage = fundCreatePage.submitAndNavigateToNewFundConfirmationPage(submitParameters);
confirmationPage.submitAndNavigateToAdminPage();
ViewFundsPage fundsPage = adminPage.navigateToViewFundsPage();
String[] expectedFundNames = new String[] { "Non Donor", "Funding Org A", "Funding Org B", "Funding Org C", "Funding Org D", "aaa" };
String[] expectedFundCodes = new String[] { "00", "00", "00", "00", "00", "01" };
//Then
fundsPage.verifyFundNameAndCode(expectedFundNames, expectedFundCodes);
//When
String arabic = "الإدارة";
String chinese = "贷款";
EditFundSubmitParameters editSubmitParameters = new EditFundSubmitParameters();
editSubmitParameters.setFundName("aaa" + arabic + chinese);
EditFundPage editFundPage = fundsPage.editAndNavigateToEditFundPage();
EditFundConfirmationPage editFundConfirmationPage = editFundPage.submitAndNavigateToEditFundConfirmationPage(editSubmitParameters);
adminPage = editFundConfirmationPage.submitAndNavigateToAdminPage();
fundsPage = adminPage.navigateToViewFundsPage();
String[] expectedFundNamesSpecial = new String[] { "Non Donor", "Funding Org A", "Funding Org B", "Funding Org C", "Funding Org D", "aaa" + arabic + chinese };
//Then
fundsPage.verifyFundNameAndCode(expectedFundNamesSpecial, expectedFundCodes);
}
Aggregations