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