Search in sources :

Example 86 with AdminPage

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);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)

Example 87 with AdminPage

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);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) ViewOrganizationSettingsPage(org.mifos.test.acceptance.framework.admin.ViewOrganizationSettingsPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) FeesCreatePage(org.mifos.test.acceptance.framework.admin.FeesCreatePage) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Aggregations

AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)87 Test (org.testng.annotations.Test)33 HomePage (org.mifos.test.acceptance.framework.HomePage)9 CreateQuestionGroupPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupPage)8 CreateQuestionGroupParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters)7 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)7 DateTime (org.joda.time.DateTime)6 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)6 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)6 CreateQuestionPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionPage)6 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)6 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)5 DefineHiddenMandatoryFieldsPage (org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage)5 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)5 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)5 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)4 EditLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPage)4 EditLoanProductPreviewPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage)4 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)4 ViewLoanProductsPage (org.mifos.test.acceptance.framework.loanproduct.ViewLoanProductsPage)4