Search in sources :

Example 6 with CollectionSheetEntrySelectPage

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

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

the class CollectionSheetEntryInputErrorsTest method clickingContinueInBulkEntryPageWithNoInputShouldResultInErrorMessage.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void clickingContinueInBulkEntryPageWithNoInputShouldResultInErrorMessage() throws Exception {
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    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)

Example 8 with CollectionSheetEntrySelectPage

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

Example 9 with CollectionSheetEntrySelectPage

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

the class CollectionSheetEntryTest method navigateToCollectionSheetEntryEnterData.

private CollectionSheetEntryEnterDataPage navigateToCollectionSheetEntryEnterData(SubmitFormParameters formParameters) {
    CollectionSheetEntrySelectPage selectPage = new CollectionSheetEntryTestHelper(selenium).loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    CollectionSheetEntryEnterDataPage enterDataPage = selectPage.submitAndGotoCollectionSheetEntryEnterDataPage(formParameters);
    enterDataPage.verifyPage();
    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 10 with CollectionSheetEntrySelectPage

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

CollectionSheetEntrySelectPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage)13 CollectionSheetEntryTestHelper (org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper)11 CollectionSheetEntryEnterDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)9 SubmitFormParameters (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)7 CollectionSheetEntryConfirmationPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage)5 CollectionSheetEntryPreviewDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage)4 Test (org.testng.annotations.Test)3 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)2 HomePage (org.mifos.test.acceptance.framework.HomePage)2