Search in sources :

Example 1 with CollectionSheetEntryEnterDataPage

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

the class CollectionSheetEntryTestHelper method submitCollectionSheetWithChangedAttendance.

public CollectionSheetEntryConfirmationPage submitCollectionSheetWithChangedAttendance(SubmitFormParameters collectionSheetParams, int[] prevAttendanceValues, int[] attendanceValues) {
    CollectionSheetEntryEnterDataPage enterDataPage = loginAndNavigateToCollectionSheetEntrySelectPage().submitAndGotoCollectionSheetEntryEnterDataPage(collectionSheetParams);
    for (int i = 0; i < attendanceValues.length; i++) {
        enterDataPage.verifyAttendance(i, prevAttendanceValues[i]);
        enterDataPage.enterAttendance(i, attendanceValues[i]);
    }
    return enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage().submitAndGotoCollectionSheetEntryConfirmationPage();
}
Also used : CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)

Example 2 with CollectionSheetEntryEnterDataPage

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

the class CollectionSheetEntryCustomerAccountTest method enterAndSubmitCustomerAccountDataOnSecondEditing.

private CollectionSheetEntryConfirmationPage enterAndSubmitCustomerAccountDataOnSecondEditing(SubmitFormParameters formParameters, double[] testAcctValues, double[] customerAcctValues) {
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    CollectionSheetEntryEnterDataPage enterDataPage = selectCenterAndContinue(formParameters, selectPage);
    enterFirstGroupCustomerAccountValues(enterDataPage, testAcctValues);
    enterGenericCustomerAccountValues(enterDataPage);
    CollectionSheetEntryPreviewDataPage previewPage = enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();
    enterDataPage = previewPage.editAndGoToCollectionSheetEntryEnterDataPage();
    enterDataPage.verifyCustomerAccountValue(0, 6, 11.0);
    enterDataPage.verifyCustomerAccountValue(1, 6, 22.0);
    enterDataPage.verifyCustomerAccountValue(2, 6, 33.0);
    enterDataPage.verifyCustomerAccountValue(3, 6, 44.0);
    enterDataPage.verifyCustomerAccountValue(4, 6, 33.0);
    enterFirstGroupCustomerAccountValues(enterDataPage, customerAcctValues);
    previewPage = enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();
    CollectionSheetEntryConfirmationPage confirmationPage = previewPage.submitAndGotoCollectionSheetEntryConfirmationPage();
    return confirmationPage;
}
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) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)

Example 3 with CollectionSheetEntryEnterDataPage

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

the class CollectionSheetEntryCustomerAccountTest method unpaidFeeDisplayedOnSecondCollectionSheetEntryAndSaved.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@Test(enabled = true)
public void unpaidFeeDisplayedOnSecondCollectionSheetEntryAndSaved() throws Exception {
    SubmitFormParameters formParameters = getFormParametersForTestOffice();
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntryConfirmationPage confirmationPage = enterAndSubmitCustomerAccountDataOnSecondEditing(formParameters, TEST_ACCT_VALUES, FIRST_PARTIAL_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, 77.0);
    enterDataPage.verifyCustomerAccountValue(2, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(3, 6, 251.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) Test(org.testng.annotations.Test)

Example 4 with CollectionSheetEntryEnterDataPage

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

the class CollectionSheetEntryCustomerAccountTest method selectCenterAndContinue.

private CollectionSheetEntryEnterDataPage selectCenterAndContinue(SubmitFormParameters formParameters, CollectionSheetEntrySelectPage selectPage) {
    CollectionSheetEntryEnterDataPage enterDataPage = selectPage.submitAndGotoCollectionSheetEntryEnterDataPage(formParameters);
    enterDataPage.verifyPage();
    return enterDataPage;
}
Also used : CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)

Example 5 with CollectionSheetEntryEnterDataPage

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

the class CollectionSheetEntryInputErrorsTest method enteringOverpaymentForLoanAndClickingSubmitShouldWarnUserOfOverpayment.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void enteringOverpaymentForLoanAndClickingSubmitShouldWarnUserOfOverpayment() throws Exception {
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    SubmitFormParameters formParameters = getFormParametersForTestOffice();
    CollectionSheetEntryEnterDataPage enterDataPage = navigateToCollectionSheetEntryPage(formParameters);
    enterDataPage.verifyPage();
    Double overPayment = 8500.8;
    enterDataPage.enterAccountValue(0, 1, overPayment);
    CollectionSheetEntryPreviewDataPage previewPage = enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();
    previewPage.verifyPage(formParameters);
    CollectionSheetEntryConfirmationPage confirmationPage = previewPage.submitAndGotoCollectionSheetEntryConfirmationPage();
    confirmationPage.verifyPage();
    // Not able to bring in internationalized string yet - jpw
    // Locale defaultLocale = Locale.getDefault();
    // String errorsUpdate =
    // SearchUtils.getMessageWithSubstitution(FilePaths.BULKENTRY_RESOURCE,
    // defaultLocale,
    // CollectionSheetEntryConstants.ERRORSUPDATE, null);
    //
    Assert.assertTrue(confirmationPage.isCollectionSheetAccountErrorMessageDisplayed(collectionSheetAccountError, loanRepayments));
}
Also used : CollectionSheetEntryPreviewDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage) 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)

Aggregations

CollectionSheetEntryEnterDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)15 CollectionSheetEntrySelectPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage)9 SubmitFormParameters (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)8 CollectionSheetEntryConfirmationPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage)7 CollectionSheetEntryTestHelper (org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper)7 CollectionSheetEntryPreviewDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage)6 Test (org.testng.annotations.Test)4 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)2 HomePage (org.mifos.test.acceptance.framework.HomePage)2