Search in sources :

Example 6 with CollectionSheetEntryEnterDataPage

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

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

the class CollectionSheetEntryInputErrorsTest method navigateToCollectionSheetEntryPage.

private CollectionSheetEntryEnterDataPage navigateToCollectionSheetEntryPage(SubmitFormParameters formParameters) {
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    CollectionSheetEntryEnterDataPage enterDataPage = selectPage.submitAndGotoCollectionSheetEntryEnterDataPage(formParameters);
    return enterDataPage;
}
Also used : CollectionSheetEntrySelectPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage) CollectionSheetEntryTestHelper(org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)

Example 8 with CollectionSheetEntryEnterDataPage

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

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

the class CollectionSheetEntryTest method twoLoansWithSameProductHasMergedLoanAmount.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void twoLoansWithSameProductHasMergedLoanAmount() throws Exception {
    SubmitFormParameters formParameters = getFormParametersForTestOffice();
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntryEnterDataPage enterDataPage = navigateToCollectionSheetEntryEnterData(formParameters);
    //check amount due for client who has two loan accounts on the same product
    enterDataPage.verifyLoanAmountValue(3, 0, 2088.0);
    enterDataPage.cancel();
}
Also used : SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage) Test(org.testng.annotations.Test)

Example 10 with CollectionSheetEntryEnterDataPage

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

the class CollectionSheetEntrySimpleTest method checkForValueObjectConversionErrorWhenEnteringInvalidDate.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void checkForValueObjectConversionErrorWhenEnteringInvalidDate(SubmitFormParameters invalidFormParameters, SubmitFormParameters validFormParameters) throws Exception {
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    boolean onlyTypeIfFieldIsEmpty = true;
    boolean waitForPageToLoad = true;
    selectPage.submitAndGotoCollectionSheetEntryEnterDataPageWithoutVerifyingPage(invalidFormParameters, onlyTypeIfFieldIsEmpty, waitForPageToLoad);
    CollectionSheetEntrySelectPage collectionSheetEntrySelectPageWithError = new CollectionSheetEntrySelectPage(selenium);
    collectionSheetEntrySelectPageWithError.verifyPage();
    Assert.assertTrue(collectionSheetEntrySelectPageWithError.isErrorMessageDisplayed());
    onlyTypeIfFieldIsEmpty = false;
    waitForPageToLoad = false;
    CollectionSheetEntryEnterDataPage enterDataPage = collectionSheetEntrySelectPageWithError.submitAndGotoCollectionSheetEntryEnterDataPage(validFormParameters, onlyTypeIfFieldIsEmpty, waitForPageToLoad);
    enterDataPage.verifyPage();
}
Also used : CollectionSheetEntrySelectPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage) CollectionSheetEntryTestHelper(org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper) 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