use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method createTwoLoanAccountsWithMixedRestricedPoducts.
public LoanAccountPage createTwoLoanAccountsWithMixedRestricedPoducts(CreateLoanAccountSearchParameters searchParams1, CreateLoanAccountSearchParameters searchParams2, DisburseLoanParameters disburseParams, DateTime disbursalDate) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToAdminPage().navigateToDefineProductMix().createOneMixAndNavigateToClientsAndAccounts(searchParams1.getLoanProduct(), searchParams2.getLoanProduct()).navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams1).setDisbursalDate(disbursalDate).continuePreviewSubmitAndNavigateToDetailsPage();
loanAccountPage.changeAccountStatusToAccepted();
loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseParams).submitAndNavigateToLoanAccountPage();
// create second account and try to disburse
return loanAccountPage.navigateToClientsAndAccountsUsingHeaderTab().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams2).setDisbursalDate(disbursalDate).continuePreviewSubmitAndNavigateToDetailsPage().changeAccountStatusToAccepted().tryNavigatingToDisburseLoanWithError();
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method createActivateDisburstAndApplyPaymentForDefaultLoanAccount.
public LoanAccountPage createActivateDisburstAndApplyPaymentForDefaultLoanAccount(String clientName, String dd, String mm, String yy) {
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString(clientName);
searchParams.setLoanProduct("WeeklyClientFlatLoanWithNoFee");
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setDisbursalDateDD(dd);
disburseParams.setDisbursalDateMM(mm);
disburseParams.setDisbursalDateYYYY(yy);
disburseParams.setPaymentType(PaymentParameters.CASH);
disburseParams.setAmount("10,000");
LoanAccountPage loanAccountPage = createActivateAndDisburseDefaultLoanAccount(searchParams, disburseParams);
String accountID = loanAccountPage.getAccountId();
PaymentParameters paymentParams = new PaymentParameters();
paymentParams.setTransactionDateDD(dd);
paymentParams.setTransactionDateMM(mm);
paymentParams.setTransactionDateYYYY(yy);
paymentParams.setPaymentType(PaymentParameters.CASH);
paymentParams.setAmount("1");
paymentParams.setReceiptId("");
paymentParams.setReceiptDateDD("");
paymentParams.setReceiptDateMM("");
paymentParams.setReceiptDateYYYY("");
return applyPayment(accountID, paymentParams);
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method applyChargeToGroupLoan.
/**
* Applies a charge to the group loan account with id <tt>loanId</tt>.
* @param loanId The account id.
* @param params The charge parameters (amount, type and list of amounts for member accounts).
* @return The loan account page for the group loan account.
*/
public LoanAccountPage applyChargeToGroupLoan(String loanId, ChargeParameters params) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
ApplyChargePage applyChargePage = loanAccountPage.navigateToApplyCharge();
DivideGroupChargesPage divideGroupChargesPage = applyChargePage.submitAndNavigateToDivideGroupChargesPage(params);
loanAccountPage = divideGroupChargesPage.submitAndNavigateToLoanAccountPage(params);
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method removePeriodicFee.
public void removePeriodicFee(int feeIndex) {
LoanAccountPage loanAccountPage = new LoanAccountPage(selenium);
loanAccountPage.removePeriodicFee(feeIndex);
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanTestHelper method applyCharge.
public LoanAccountPage applyCharge(String feeName, String amount) {
ChargeParameters chargeParameters = new ChargeParameters();
chargeParameters.setType(feeName);
chargeParameters.setAmount(amount);
return new LoanAccountPage(selenium).navigateToApplyCharge().submitAndNavigateToApplyChargeConfirmationPage(chargeParameters);
}
Aggregations