use of org.mifos.test.acceptance.framework.admin.ImportSavingsReviewPage 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);
}
use of org.mifos.test.acceptance.framework.admin.ImportSavingsReviewPage in project head by mifos.
the class AdminTestHelper method loadImportSavingsFileAndSubmitForReview.
public ImportSavingsReviewPage loadImportSavingsFileAndSubmitForReview(String importFile) {
AdminPage adminPage = navigationHelper.navigateToAdminPage();
ImportSavingsPage selectFilePage = adminPage.navigateToImportSavingPage();
selectFilePage.verifyPage();
ImportSavingsReviewPage reviewPage = selectFilePage.submitToReview(importFile);
reviewPage.verifyPage();
return reviewPage;
}
Aggregations