Search in sources :

Example 1 with CollectionSheetEntryTestHelper

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

use of org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper 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 3 with CollectionSheetEntryTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper 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 4 with CollectionSheetEntryTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper 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 5 with CollectionSheetEntryTestHelper

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

CollectionSheetEntryTestHelper (org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper)13 CollectionSheetEntrySelectPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage)11 CollectionSheetEntryEnterDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)7 SubmitFormParameters (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)5 CollectionSheetEntryPreviewDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryPreviewDataPage)4 CollectionSheetEntryConfirmationPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage)3 DateTime (org.joda.time.DateTime)2 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)2 BeforeMethod (org.testng.annotations.BeforeMethod)2 Test (org.testng.annotations.Test)2 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)1