Search in sources :

Example 1 with CollectionSheetEntryPreviewDataPage

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage 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 2 with CollectionSheetEntryPreviewDataPage

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage 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)

Example 3 with CollectionSheetEntryPreviewDataPage

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

the class CollectionSheetEntryInputErrorsTest method enteringExcessiveWithdrawalAmountAndClickingSubmitShouldWarnUserOfInvalidWithdrawal.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void enteringExcessiveWithdrawalAmountAndClickingSubmitShouldWarnUserOfInvalidWithdrawal() throws Exception {
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    SubmitFormParameters formParameters = getFormParametersForTestOffice();
    CollectionSheetEntryEnterDataPage enterDataPage = navigateToCollectionSheetEntryPage(formParameters);
    enterDataPage.verifyPage();
    Double excessiveWithdrawal = 80000.8;
    enterDataPage.enterWithdrawalAccountValue(0, 5, excessiveWithdrawal);
    CollectionSheetEntryPreviewDataPage previewPage = enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();
    previewPage.verifyPage(formParameters);
    CollectionSheetEntryConfirmationPage confirmationPage = previewPage.submitAndGotoCollectionSheetEntryConfirmationPage();
    confirmationPage.verifyPage();
    Assert.assertTrue(confirmationPage.isCollectionSheetAccountErrorMessageDisplayed(collectionSheetAccountError, savingsWithdrawal));
}
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)

Example 4 with CollectionSheetEntryPreviewDataPage

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

the class CollectionSheetEntrySimpleTest method checkThatPreviewEditButtonWorks.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// TODO js - temporarily disabled broken test
@Test(enabled = true)
public void checkThatPreviewEditButtonWorks() throws Exception {
    SubmitFormParameters formParameters = getFormParameters();
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    CollectionSheetEntryEnterDataPage enterDataPage = selectPage.submitAndGotoCollectionSheetEntryEnterDataPage(formParameters);
    CollectionSheetEntryPreviewDataPage previewDataPage = enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();
    previewDataPage.verifyPage(formParameters);
    previewDataPage.editAndGoToCollectionSheetEntryEnterDataPage();
}
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) SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage) Test(org.testng.annotations.Test)

Example 5 with CollectionSheetEntryPreviewDataPage

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage 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)

Aggregations

CollectionSheetEntryPreviewDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage)7 CollectionSheetEntryEnterDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)6 CollectionSheetEntryConfirmationPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage)5 CollectionSheetEntrySelectPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage)4 SubmitFormParameters (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)4 CollectionSheetEntryTestHelper (org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper)4 Test (org.testng.annotations.Test)2