use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method verifyNoOneTimeFeeRemovalLinkExists.
public void verifyNoOneTimeFeeRemovalLinkExists(int feeIndex) {
LoanAccountPage loanAccountPage = new LoanAccountPage(selenium);
loanAccountPage.verifyNoOneTimeFeeRemovalLinkExists(feeIndex);
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method createMultipleLoanAccountsWithMixedRestricedPoducts.
public CreateLoanAccountsSuccessPage createMultipleLoanAccountsWithMixedRestricedPoducts(CreateMultipleLoanAccountSelectParameters multipleAccParameters1, CreateMultipleLoanAccountSelectParameters multipleAccParameters2, DisburseLoanParameters disburseParams, String[] clients, String firstRepaymentDate) {
navigationHelper.navigateToAdminPage().navigateToDefineProductMix().createOneMixAndNavigateToClientsAndAccounts(multipleAccParameters1.getLoanProduct(), multipleAccParameters2.getLoanProduct());
CreateLoanAccountsSuccessPage createLoanAccountsSuccessPage = createMultipleLoanAccounts(multipleAccParameters1, clients, "0000-Animal Husbandry");
List<String> accountNumbers = createLoanAccountsSuccessPage.verifyAndGetLoanAccountNumbers(clients.length);
LoanAccountPage loanAccountPage = createLoanAccountsSuccessPage.selectLoansAndNavigateToLoanAccountPage(0);
for (int i = 0; i < accountNumbers.size(); i++) {
if (i > 0) {
loanAccountPage = loanAccountPage.navigateToClientsAndAccountsUsingHeaderTab().searchForClient(accountNumbers.get(i)).navigateToLoanAccountSearchResult("Account # " + accountNumbers.get(i));
}
loanAccountPage.changeAccountStatusToAccepted();
loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseParams).submitAndNavigateToLoanAccountPage();
// additional schedule verification due to MIFOS-4943
loanAccountPage.navigateToRepaymentSchedulePage();
Assert.assertEquals(selenium.getTable("installments.3.1").trim(), firstRepaymentDate);
}
loanAccountPage.navigateToClientsAndAccountsUsingHeaderTab();
return createMultipleLoanAccounts(multipleAccParameters2, clients, "0000-Animal Husbandry");
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class PenaltyHelper method createWeeklyLoanAccountWithPenalty.
public LoanAccountPage createWeeklyLoanAccountWithPenalty(final SubmitFormParameters formParameters, final String clientName, final boolean disbursal) throws Exception {
navigationHelper.navigateToAdminPage().verifyPage().defineLoanProduct(formParameters);
final CreateLoanAccountSearchParameters searchParam = new CreateLoanAccountSearchParameters();
searchParam.setSearchString(clientName);
searchParam.setLoanProduct(formParameters.getOfferingName());
LoanAccountPage loanAccountPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParam).navigateToReviewInstallmentsPage().clickPreviewAndGoToReviewLoanAccountPage().submitForApprovalAndNavigateToConfirmationPage().navigateToLoanAccountDetailsPage();
if (disbursal) {
loanAccountPage.changeAccountStatusToAccepted();
final DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setAmount(formParameters.getDefaultLoanAmount());
disburseParams.setDisbursalDateDD("15");
disburseParams.setDisbursalDateMM("2");
disburseParams.setDisbursalDateYYYY("2012");
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
loanAccountPage.disburseLoan(disburseParams);
}
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method disburseLoan.
public void disburseLoan(DateTime disbursalDate) throws UnsupportedEncodingException {
setApplicationTime(disbursalDate).navigateBack();
DisburseLoanParameters disburseLoanParameters = setDisbursalParams(disbursalDate);
LoanAccountPage loanAccountPage = new LoanAccountPage(selenium).navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseLoanParameters).submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method makePayment.
public LoanAccountPage makePayment(DateTime paymentDate, String paymentAmount) throws UnsupportedEncodingException {
PaymentParameters paymentParameters = setPaymentParams(paymentAmount, paymentDate);
setApplicationTime(paymentDate).navigateBack();
LoanAccountPage loanAccountPage = new LoanAccountPage(selenium).navigateToApplyPayment().submitAndNavigateToApplyPaymentConfirmationPage(paymentParameters).submitAndNavigateToLoanAccountDetailsPage();
AccountActivityPage accountActivityPage = loanAccountPage.navigateToAccountActivityPage();
accountActivityPage.verifyLastTotalPaid(paymentAmount, 2);
accountActivityPage.navigateBack();
return loanAccountPage;
}
Aggregations