Search in sources :

Example 6 with SubmitFormParameters

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

use of org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters 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 8 with SubmitFormParameters

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

the class CollectionSheetEntryInputErrorsTest method clickingContinueInBulkEntryPageAndOnlyEnteringBranchAndLoanOfficerAndCenterShouldResultInErrorMessage.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void clickingContinueInBulkEntryPageAndOnlyEnteringBranchAndLoanOfficerAndCenterShouldResultInErrorMessage() throws Exception {
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    SubmitFormParameters formParameters = setFormParametersForTestOffice("MyOffice1233265929385", "Joe1233265931256 Guy1233265931256", "MyCenter1233265933427", null);
    selectPage.fillOutDropDownMenusWithGivenInput(formParameters);
    selectPage.submit();
    selectPage.verifyPage();
    Assert.assertTrue(selectPage.isErrorMessageDisplayed());
}
Also used : 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)

Example 9 with SubmitFormParameters

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

the class CollectionSheetEntryInputErrorsTest method clickingContinueInBulkEntryPageAndOnlyEnteringBranchAndLoanOfficerShouldResultInErrorMessage.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void clickingContinueInBulkEntryPageAndOnlyEnteringBranchAndLoanOfficerShouldResultInErrorMessage() throws Exception {
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    SubmitFormParameters formParameters = setFormParametersForTestOffice("MyOffice1233265929385", "Joe1233265931256 Guy1233265931256", null, null);
    selectPage.fillOutDropDownMenusWithGivenInput(formParameters);
    selectPage.submit();
    selectPage.verifyPage();
    Assert.assertTrue(selectPage.isErrorMessageDisplayed());
}
Also used : 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)

Example 10 with SubmitFormParameters

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

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