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));
}
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;
}
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();
}
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();
}
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();
}
Aggregations