Search in sources :

Example 46 with AdminPage

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;
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage)

Example 47 with 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();
}
Also used : CreateCenterEnterDataPage(org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage) MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) Test(org.testng.annotations.Test)

Example 48 with AdminPage

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);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) Random(java.util.Random) CreateQuestionGroupParameters(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters) CreateQuestionPage(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionPage) CreateQuestionGroupPage(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupPage)

Example 49 with AdminPage

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);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage)

Example 50 with AdminPage

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);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateFundSubmitParameters(org.mifos.test.acceptance.framework.admin.FundCreatePage.CreateFundSubmitParameters) ViewFundsPage(org.mifos.test.acceptance.framework.admin.ViewFundsPage) EditFundSubmitParameters(org.mifos.test.acceptance.admin.EditFundPage.EditFundSubmitParameters) EditFundConfirmationPage(org.mifos.test.acceptance.framework.admin.EditFundConfirmationPage) FundCreatePage(org.mifos.test.acceptance.framework.admin.FundCreatePage) CreateNewFundConfirmationPage(org.mifos.test.acceptance.framework.admin.CreateNewFundConfirmationPage)

Aggregations

AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)87 Test (org.testng.annotations.Test)33 HomePage (org.mifos.test.acceptance.framework.HomePage)9 CreateQuestionGroupPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupPage)8 CreateQuestionGroupParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters)7 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)7 DateTime (org.joda.time.DateTime)6 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)6 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)6 CreateQuestionPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionPage)6 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)6 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)5 DefineHiddenMandatoryFieldsPage (org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage)5 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)5 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)5 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)4 EditLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPage)4 EditLoanProductPreviewPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage)4 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)4 ViewLoanProductsPage (org.mifos.test.acceptance.framework.loanproduct.ViewLoanProductsPage)4