use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class BackDateLoanProductTest method preparePageForTest.
private DefineNewLoanProductPage preparePageForTest() {
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineNewLoanProductPage newLoanProductPage = adminPage.navigateToDefineLoanProduct();
SubmitFormParameters parameters = FormParametersHelper.getMonthlyLoanProductParameters();
return newLoanProductPage.fillLoanParameters(parameters);
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class LoanProcessWithDifferentCurrencyTest method createLoanProductThenAccount.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test
public // http://mifosforge.jira.com/browse/MIFOSTEST-657
void createLoanProductThenAccount() throws Exception {
//Given
propertiesHelper.setAdditionalCurrenciesCode("EUR,USD");
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 17, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "LoanProcessWithDifferentCurrencyTest_001_dbunit.xml", dataSource, selenium);
//When
propertiesHelper.setDigitsAfterDecimal(2);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
ViewOrganizationSettingsPage viewOrganizationSettingsPage = adminPage.navigateToViewOrganizationSettingsPage();
viewOrganizationSettingsPage.verifyCurrencies(new String[] { "Currency: USD" });
viewOrganizationSettingsPage.verifyCurrencies(new String[] { "Currency: EUR" });
viewOrganizationSettingsPage.verifyCurrencies(new String[] { "Number of digits after decimal: 2" });
viewOrganizationSettingsPage.verifyCurrencies(new String[] { "Final Round Off Multiple: 1" });
viewOrganizationSettingsPage.verifyCurrencies(new String[] { "Initial Round Off Multiple: 1" });
//Then
FeesCreatePage.SubmitFormParameters formParameters = FormParametersHelper.getOneTimeLoanMultiCurrencyFeesParameters();
adminPage = navigationHelper.navigateToAdminPage();
formParameters.setFeeName("USDfee");
adminPage.defineNewFees(formParameters);
formParameters = FormParametersHelper.getOneTimeLoanMultiCurrencyFeesParameters();
adminPage = navigationHelper.navigateToAdminPage();
formParameters.setFeeName("USDfeeAdditional");
formParameters.setAmount(20.0);
adminPage.defineNewFees(formParameters);
createWeeklyLoanProduct();
String loanAccountId = createLoanAccountOfDifferentCurrency("Client-1-USD");
pendingApprovalToApplicationApproved(loanAccountId);
disburseLoan(loanAccountId);
applyPayment(loanAccountId);
navigationHelper.navigateToLoanAccountPage(loanAccountId);
//veryfy "USDfee"(10) and "USDfeeAdditional"(20)
Assert.assertEquals(selenium.getTable("loanSummaryTable.3.1"), "30");
//restore parameters
propertiesHelper.setDigitsAfterDecimal(1);
}
Aggregations