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);
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class ClientTest method verifyErrorsMessages.
@Test(singleThreaded = true, groups = { "smoke", "client", "acceptance", "ui", "no_db_unit" }, enabled = true)
public void verifyErrorsMessages() {
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineHiddenMandatoryFieldsPage mandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
mandatoryFieldsPage.checkMandatoryCitizenShip();
mandatoryFieldsPage.checkMandatoryEthnicity();
mandatoryFieldsPage.checkMandatoryMaritalStatus();
mandatoryFieldsPage.submit();
CreateClientEnterPersonalDataPage personalDataPage = navigationHelper.navigateToCreateClientEnterPersonalDataPage(officeName);
String[] errors = personalDataPage.getMandatoryBlankFieldsNames();
String[] fields = new String[] { "Salutation", "First Name", "Last Name", "Date of birth", "Gender", "Ethnicity", "Citizenship", "Poverty status", "Marital Status" };
for (int i = 0; i < fields.length; ++i) {
Assert.assertEquals(fields[i], errors[i]);
}
adminPage = navigationHelper.navigateToAdminPage();
adminPage.navigateToDefineHiddenMandatoryFields();
mandatoryFieldsPage.uncheckMandatoryCitizenShip();
mandatoryFieldsPage.uncheckMandatoryEthnicity();
mandatoryFieldsPage.uncheckMandatoryMaritalStatus();
mandatoryFieldsPage.submit();
adminPage.logout();
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class AdminTestHelper method loadClientDataImportFileAndSubmitForReview.
public ClientDataImportReviewPage loadClientDataImportFileAndSubmitForReview(String importFile) {
AdminPage adminPage = navigationHelper.navigateToAdminPage();
ClientDataImportPage selectFilePage = adminPage.navigateToClientDataImportPage();
selectFilePage.verifyPage();
ClientDataImportReviewPage reviewPage = selectFilePage.submitToReview(importFile);
reviewPage.verifyPage();
return reviewPage;
}
use of org.mifos.test.acceptance.framework.admin.AdminPage 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;
}
use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.
the class ClientLoanDisbursalTest method verifyAcceptedPaymentTypesForDisbursementsOfLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-249
void verifyAcceptedPaymentTypesForDisbursementsOfLoan() throws Exception, InterruptedException {
// When
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.VOUCHER);
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
searchParams.setSearchString("Stu1233266063395 Client1233266063395");
//Extension https://mifosforge.jira.com/browse/MIFOSTEST-1194
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
DisburseLoanPage disburseLoanPage = loanAccountPage.navigateToDisburseLoan();
DisburseLoanParameters params = new DisburseLoanParameters();
params.setDisbursalDateDD("20");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
params.setPaymentType(params.CASH);
disburseLoanPage.verifyDisbursalDateIsFutureDate(params);
//disburseLoanPage.submitWithWrongParams(params, "Date of transaction can not be a future date");
params.setDisbursalDateDD("01");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
disburseLoanPage.verifyDisbursalDateIsPriorToClientMeetingSchedule(params);
params.setDisbursalDateDD("04");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.submitAndNavigateToDisburseLoanConfirmationPage(params).submitAndNavigateToLoanAccountPage();
String[] locators = { "Payment rcvd.", "accountActivityTable.2.1" };
loanAccountPage.navigateToViewLoanAccountActivityPage().verifyAllElementsArePresent(locators);
//When
disburseLoanPage = navigationHelper.navigateToLoanAccountPage("000100000000020").navigateToDisburseLoan();
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.verifyPaymentModesOfPaymentAreEmpty();
disburseLoanPage.verifyPaymentModeOfPaymentIsEditable("payment mode of payment must be editable when a disbursal fee exists.");
}
Aggregations