Search in sources :

Example 1 with ImportSavingsSaveSummaryPage

use of org.mifos.test.acceptance.framework.admin.ImportSavingsSaveSummaryPage in project head by mifos.

the class SavingsImportTest method importSavingAccountsToClientTest.

@Test(enabled = true)
public void importSavingAccountsToClientTest() {
    ManageRolePage manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
    try {
        manageRolePage.enablePermission("8_8");
    } catch (AssertionError ex) {
        Logger.getAnonymousLogger().info("Permission is marked.");
    }
    manageRolePage.submitAndGotoViewRolesPage();
    String succesNumber = "1";
    String errorNumber = "5";
    arrayOfErrors = buildArrayOfErrorsForImportSavingsTest();
    String importFile = this.getClass().getResource("/ImportSavingsAccountsTest.xls").toString();
    SavingsProductParameters parameters = savingsProductHelper.getGenericSavingsProductParameters(targetTime, SavingsProductParameters.VOLUNTARY, SavingsProductParameters.CLIENTS);
    parameters.setProductInstanceName("importSavings");
    parameters.setShortName("IMP");
    try {
        savingsProductHelper.createSavingsProduct(parameters);
    } catch (AssertionError e) {
        Logger.getAnonymousLogger().info("Product exists");
    }
    ImportSavingsReviewPage reviewPage = adminTestHelper.loadImportSavingsFileAndSubmitForReview(importFile);
    reviewPage.validateErrors(arrayOfErrors);
    reviewPage.validateSuccesText(succesNumber);
    ImportSavingsSaveSummaryPage summaryPage = reviewPage.saveSuccessfullRows();
    summaryPage.verifySuccesString(succesNumber);
    summaryPage.verifyErrorString(errorNumber);
}
Also used : ManageRolePage(org.mifos.test.acceptance.framework.admin.ManageRolePage) ImportSavingsSaveSummaryPage(org.mifos.test.acceptance.framework.admin.ImportSavingsSaveSummaryPage) SavingsProductParameters(org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters) ImportSavingsReviewPage(org.mifos.test.acceptance.framework.admin.ImportSavingsReviewPage) Test(org.testng.annotations.Test)

Aggregations

ImportSavingsReviewPage (org.mifos.test.acceptance.framework.admin.ImportSavingsReviewPage)1 ImportSavingsSaveSummaryPage (org.mifos.test.acceptance.framework.admin.ImportSavingsSaveSummaryPage)1 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)1 SavingsProductParameters (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters)1 Test (org.testng.annotations.Test)1