Search in sources :

Example 16 with SubmitFormParameters

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.

the class CollectionSheetEntryTest method getFormParametersForTestOffice.

private SubmitFormParameters getFormParametersForTestOffice() {
    SubmitFormParameters formParameters = new SubmitFormParameters();
    formParameters.setBranch("MyOffice1233265929385");
    formParameters.setLoanOfficer("Joe1233265931256 Guy1233265931256");
    formParameters.setCenter("MyCenter1233265933427");
    formParameters.setPaymentMode("Cash");
    return formParameters;
}
Also used : SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)

Example 17 with SubmitFormParameters

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.

the class CollectionSheetEntryTest method defaultAmountsForMediumCenterSavedToDatabase.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-3
@Test(enabled = true)
public void defaultAmountsForMediumCenterSavedToDatabase() throws Exception {
    // Given
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_medium_005_dbunit.xml", dataSource, selenium);
    SubmitFormParameters formParameters = new SubmitFormParameters();
    String office = "MyOffice1233171674227";
    String officer = "Joe1233171679953 Guy1233171679953";
    String center = "MyCenter1233171688286";
    String client = "Stu1233171716380 Client1233171716380";
    formParameters.setBranch(office);
    formParameters.setLoanOfficer(officer);
    formParameters.setCenter(center);
    formParameters.setPaymentMode(SubmitFormParameters.CASH);
    // When
    LoanAccountPage loanAccountPage = sheetTestHelper.submitDefaultCollectionSheetEntryData(formParameters).navigateToClientsAndAccountsPageUsingHeaderTab().searchForClient(client).navigateToSearchResult(client + ": ID 0003-000000006").navigateToOnlyLoanAccount();
    // Then
    loanAccountPage.verifyPrincipalOriginal("2,000");
    loanAccountPage.verifyPrincipalBalance("2,000");
}
Also used : SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) Test(org.testng.annotations.Test)

Example 18 with SubmitFormParameters

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.

the class CollectionSheetEntryTest method defaultAdminUserSelectsValidCollectionSheetEntryParameters.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void defaultAdminUserSelectsValidCollectionSheetEntryParameters() throws Exception {
    SubmitFormParameters formParameters = new SubmitFormParameters();
    formParameters.setBranch("Office1");
    formParameters.setLoanOfficer("Bagonza Wilson");
    formParameters.setCenter("Center1");
    formParameters.setPaymentMode("Cash");
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    CollectionSheetEntryEnterDataPage enterDataPage = selectPage.submitAndGotoCollectionSheetEntryEnterDataPage(formParameters);
    enterDataPage.enterAccountValue(0, 0, 99.0);
    enterDataPage.enterAccountValue(1, 1, 0.0);
    enterDataPage.enterAccountValue(2, 0, 0.0);
    CollectionSheetEntryPreviewDataPage previewPage = enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();
    previewPage.verifyPage(formParameters);
    CollectionSheetEntryConfirmationPage confirmationPage = previewPage.submitAndGotoCollectionSheetEntryConfirmationPage();
    confirmationPage.verifyPage();
    verifyCollectionSheetData("acceptance_small_002_dbunit.xml");
}
Also used : CollectionSheetEntryPreviewDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage) CollectionSheetEntrySelectPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage) CollectionSheetEntryTestHelper(org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper) CollectionSheetEntryConfirmationPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage) SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage) Test(org.testng.annotations.Test)

Example 19 with SubmitFormParameters

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.

the class CollectionSheetEntryAttendanceTest method verifyEnteringAttendanceForOneCenterDoesntAffectOtherCenters.

/**
     * Verify Entering attendance for one center doesn't affect other centers.
     * http://mifosforge.jira.com/browse/MIFOSTEST-5
     * @throws Exception
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyEnteringAttendanceForOneCenterDoesntAffectOtherCenters() throws Exception {
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
    int[] overwriteAttendanceValues = new int[] { ATTENDANCE_L, ATTENDANCE_AA, ATTENDANCE_A, ATTENDANCE_P };
    int[] basicAttendanceValues = new int[] { ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_L };
    int[] secondCenterAttendance = new int[] { ATTENDANCE_AA, ATTENDANCE_A, ATTENDANCE_L };
    SubmitFormParameters collectionSheetParams = getFormParametersForCenter2();
    SubmitFormParameters collectionSheetParams2 = getFormParametersForCenter1();
    int[] defaultAttendanceValues = { ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P };
    int[] defaultAttendanceValues2 = { ATTENDANCE_P, ATTENDANCE_P, ATTENDANCE_P };
    String[] clients = { "Teja Kakarla", "Aarif Mawani", "Mutu Juma", "Anna Martin" };
    String[] clients2 = { "Veronica Abisya", "Dauda Mayowa", "Polly Gikonyo" };
    String[] clientsNotAffected = { "Tesa Mendez", "Megana Martin", "Reyna Tabilin", "Mary Asanti" };
    int[] meetingsAttended11 = { 1, 1, 1, 1 };
    int[] meetingsMissed11 = { 0, 0, 0, 0 };
    int[] meetingsAttended12 = { 1, 0, 0, 1 };
    int[] meetingsMissed12 = { 0, 1, 1, 0 };
    int[] meetingsAttended22 = { 0, 0, 1 };
    int[] meetingsMissed22 = { 1, 1, 0 };
    collectionSheetEntryTestHelper.submitCollectionSheetWithChangedAttendance(collectionSheetParams, defaultAttendanceValues, basicAttendanceValues);
    for (int i = 0; i < clients.length; i++) {
        verifyMeetingAttendances(clients[i], meetingsAttended11[i], meetingsMissed11[i]);
    }
    collectionSheetEntryTestHelper.submitCollectionSheetWithChangedAttendance(collectionSheetParams, basicAttendanceValues, overwriteAttendanceValues);
    collectionSheetEntryTestHelper.submitCollectionSheetWithChangedAttendance(collectionSheetParams2, defaultAttendanceValues2, secondCenterAttendance);
    for (int i = 0; i < clients.length; i++) {
        verifyMeetingAttendances(clients[i], meetingsAttended12[i], meetingsMissed12[i]);
    }
    for (int i = 0; i < clients2.length; i++) {
        verifyMeetingAttendances(clients2[i], meetingsAttended22[i], meetingsMissed22[i]);
    }
    for (String element : clientsNotAffected) {
        verifyMeetingAttendances(element, 0, 0);
    }
}
Also used : SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)

Example 20 with SubmitFormParameters

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters in project head by mifos.

the class CollectionSheetEntryCustomerAccountTest method previousPaidFeeNotDisplayedOnSecondCollectionSheetEntry.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void previousPaidFeeNotDisplayedOnSecondCollectionSheetEntry() throws Exception {
    SubmitFormParameters formParameters = getFormParametersForTestOffice();
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntryConfirmationPage confirmationPage = enterAndSubmitCustomerAccountData(formParameters, BASIC_CUSTOMER_ACCT_VALUES);
    // navigate back to collection sheet entry
    HomePage homePage = confirmationPage.navigateToHomePage();
    ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
    CollectionSheetEntrySelectPage selectPage = clientsAndAccountsPage.navigateToEnterCollectionSheetDataUsingLeftMenu();
    selectPage.verifyPage();
    // enter same search data and inspect displayed client account (A/C
    // Collection) values
    CollectionSheetEntryEnterDataPage enterDataPage = selectCenterAndContinue(formParameters, selectPage);
    enterDataPage.verifyCustomerAccountValue(0, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(1, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(2, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(3, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(4, 6, 0.0);
    enterDataPage.cancel();
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) CollectionSheetEntrySelectPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage) CollectionSheetEntryConfirmationPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)

Aggregations

SubmitFormParameters (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)23 CollectionSheetEntryEnterDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)8 CollectionSheetEntrySelectPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage)7 Test (org.testng.annotations.Test)6 CollectionSheetEntryConfirmationPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage)5 CollectionSheetEntryTestHelper (org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper)5 CollectionSheetEntryPreviewDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage)4 HomePage (org.mifos.test.acceptance.framework.HomePage)3 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)2 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)1 LoginPage (org.mifos.test.acceptance.framework.login.LoginPage)1 CollectionSheetReportParametersPage (org.mifos.test.acceptance.framework.reports.CollectionSheetReportParametersPage)1 ReportsPage (org.mifos.test.acceptance.framework.reports.ReportsPage)1