use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class SavingsPaymentTest method makePaymentFromSavings.
private LoanAccountPage makePaymentFromSavings(String loanGlobalNum, String savingsGlobalNum, int amount) {
CreateLoanAccountSearchParameters loanSearchParams = new CreateLoanAccountSearchParameters();
loanSearchParams.setSearchString(loanGlobalNum);
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanGlobalNum);
ApplyPaymentPage applyPaymentPage = loanAccountPage.navigateToApplyPayment();
PaymentParameters paymentParams = new PaymentParameters();
paymentParams.setAmount(String.valueOf(amount));
paymentParams.setPaymentType(PaymentParameters.TRANSFER);
paymentParams.setSavingsAccountGlobalNum(savingsGlobalNum);
paymentParams.setTransactionDateDD("13");
paymentParams.setTransactionDateMM("03");
paymentParams.setTransactionDateYYYY("2011");
paymentParams.setSavingsAccountBalance(String.valueOf(SAVINGS_START_BALANCE));
paymentParams.setSavingsAccountMaxWithdrawalAmount(String.valueOf(0));
paymentParams.setSavingsAccountType("Voluntary");
paymentParams.setSavingsAccountName("MonthlyClientSavingsAccount");
ApplyPaymentConfirmationPage paymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParams);
return paymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class LoanProcessWithDifferentCurrencyTest method createLoanAccountOfDifferentCurrency.
@SuppressWarnings({ "PMD.SignatureDeclareThrowsException" })
private // one of the dependent methods throws Exception
String createLoanAccountOfDifferentCurrency(String clientName) throws Exception {
loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString(clientName);
searchParameters.setLoanProduct("Loan With Different Currency");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1012");
String fee = "USDfeeAdditional";
submitAccountParameters.setAdditionalFee1(fee);
return createLoanAndCheckAmount(searchParameters, submitAccountParameters);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateGroupLoanAccountTest method newMonthlyGroupLoanAccountWithMeetingOnSpecificDayOfMonth.
@Test(enabled = true)
@SuppressWarnings({ "PMD.SignatureDeclareThrowsException" })
public void newMonthlyGroupLoanAccountWithMeetingOnSpecificDayOfMonth() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2010, 8, 13, 1, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
//When
homePage = loginSuccessfully();
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("MonthlyGroup");
searchParameters.setLoanProduct("MonthlyGroupFlatLoan1stOfMonth");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1000.0");
ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsPage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
createLoanAccountEntryPage.verifyPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountEntryPage.submitAndNavigateToLoanAccountConfirmationPage(submitAccountParameters);
createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateGroupLoanAccountTest method newWeeklyGroupLoanAccount.
//http://mifosforge.jira.com/browse/MIFOSTEST-303
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void newWeeklyGroupLoanAccount() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 25, 1, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
//When
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
formParameters.setSearchString("groupWithoutLoan");
formParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
createLoanAccountEntryPage.setAmount("3000.0");
createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 2, 25, 15, 0, 0, 0));
selectAdditionalFees();
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
verifyFirstInstallmentDateAndDisbursalDateOnReviewPage();
verifyAdditionalFeesOnReviewPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
verifyFirstInstallmentDateAndDisbursalDateOnPreviewPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
String loanId = loanAccountPage.getAccountId();
loanAccountPage.verifyLoanIsPendingApproval();
loanAccountPage.verifyNumberOfInstallments("4");
loanAccountPage.verifyDisbursalDate("25/02/2011");
loanAccountPage.verifyPrincipalOriginal("3,000");
loanAccountPage.verifyLoanTotalBalance("3,466");
loanAccountPage.verifyFeesOriginal("410");
loanAccountPage.verifyInterestOriginal("56");
verifyFees();
ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "04-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "11-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(5, "18-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "25-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(3, "750.2");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(4, "750.2");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(5, "750.2");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(6, "749.4");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(3, "110");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(4, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(5, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(6, "100");
viewRepaymentSchedulePage.navigateToLoanAccountPage();
EditLoanAccountStatusParameters editLoanAccountStatusParameters = new EditLoanAccountStatusParameters();
editLoanAccountStatusParameters.setStatus(EditLoanAccountStatusParameters.APPROVED);
editLoanAccountStatusParameters.setNote("test");
loanTestHelper.changeLoanAccountStatus(loanId, editLoanAccountStatusParameters);
DisburseLoanParameters disburseParameters = new DisburseLoanParameters();
disburseParameters.setPaymentType(DisburseLoanParameters.CASH);
disburseParameters.setDisbursalDateDD("25");
disburseParameters.setDisbursalDateMM("02");
disburseParameters.setDisbursalDateYYYY("2011");
loanTestHelper.disburseLoan(loanId, disburseParameters);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateGroupLoanAccountTest method tryCreateGroupLoanWithMandatoryPurposeOfLoan.
@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void tryCreateGroupLoanWithMandatoryPurposeOfLoan() throws Exception {
applicationDatabaseOperation.updateGLIM(1);
try {
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineHiddenMandatoryFieldsPage defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
defineHiddenMandatoryFieldsPage.checkMandatoryLoanAccountPurpose();
defineHiddenMandatoryFieldsPage.submit();
adminPage.navigateToClientsAndAccountsPageUsingHeaderTab();
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Default Group");
searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
CreateLoanAccountEntryPage loanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
loanAccountEntryPage.selectTwoClientsForGlim();
loanAccountEntryPage = loanAccountEntryPage.clickContinueButExpectValidationFailure();
loanAccountEntryPage.verifyError("Please specify loan purpose for member 1.");
loanAccountEntryPage.selectPurposeForGlim();
loanAccountEntryPage.clickContinue();
} finally {
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineHiddenMandatoryFieldsPage defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
defineHiddenMandatoryFieldsPage.uncheckMandatoryLoanAccountPurpose();
defineHiddenMandatoryFieldsPage.submit();
applicationDatabaseOperation.updateGLIM(0);
}
}
Aggregations