use of org.mifos.test.acceptance.framework.loan.ApplyGroupPaymentConfirmationPage in project head by mifos.
the class LoanTestHelper method applyGroupPayment.
public LoanAccountPage applyGroupPayment(String loanId, PaymentParameters paymentParams) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
ApplyGroupPaymentPage applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
ApplyGroupPaymentConfirmationPage applyGroupPaymentConfirmationPage = applyGroupPaymentPage.submitAndNavigateToApplyGroupPaymentConfirmationPage(paymentParams, true);
loanAccountPage = applyGroupPaymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.ApplyGroupPaymentConfirmationPage in project head by mifos.
the class LoanTestHelper method applyGroupIndividualClientPayment.
public LoanAccountPage applyGroupIndividualClientPayment(String loanId, PaymentParameters paymentParams) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
ApplyGroupPaymentPage applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
ApplyGroupPaymentConfirmationPage applyGroupPaymentConfirmationPage = applyGroupPaymentPage.submitAndNavigateToApplyGroupPaymentConfirmationPage(paymentParams, false);
loanAccountPage = applyGroupPaymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.ApplyGroupPaymentConfirmationPage in project head by mifos.
the class ApplyPaymentOnGLIMLoanAccountTest method checkApplyPaymentOnGLIMLoanAccount.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void checkApplyPaymentOnGLIMLoanAccount() throws Exception {
LoanAccountPage loanAccountPage = createNewLoan();
AccountChangeStatusPage accountChangeStatusPage = loanAccountPage.navigateToEditAccountStatus();
EditLoanAccountStatusParameters params = new EditLoanAccountStatusParameters();
params.setNote("asd");
params.setStatus(EditLoanAccountStatusParameters.APPROVED);
loanAccountPage = accountChangeStatusPage.submitAndNavigateToNextPage(params).submitAndNavigateToLoanAccountPage();
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setDisbursalDateDD("04");
disburseParams.setDisbursalDateMM("03");
disburseParams.setDisbursalDateYYYY("2011");
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
loanAccountPage = loanAccountPage.disburseLoan(disburseParams);
ApplyGroupPaymentPage applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
applyGroupPaymentPage.setAmount("140");
applyGroupPaymentPage.verifyIndividualAmount(0, "20.0");
applyGroupPaymentPage.verifyIndividualAmount(1, "40.0");
applyGroupPaymentPage.verifyIndividualAmount(2, "80.0");
//principal 25, less
applyGroupPaymentPage.setIndividualAmount(0, "20");
//principal 50, equal
applyGroupPaymentPage.setIndividualAmount(1, "50");
//principal 100, more
applyGroupPaymentPage.setIndividualAmount(2, "120");
applyGroupPaymentPage.verifyAmount("190");
applyGroupPaymentPage.setPaymentMethod("1");
applyGroupPaymentPage.setDate("04", "03", "2011");
ApplyGroupPaymentConfirmationPage applyGroupPaymentConfirmation = applyGroupPaymentPage.submit();
loanAccountPage = applyGroupPaymentConfirmation.submitAndNavigateToLoanAccountDetailsPage();
ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
verifyRepaymentScheduleInstallmentsPaid(viewRepaymentSchedulePage, EXPECTED_PAID_INSTALLMENTS);
loanAccountPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
for (int i = 0; i <= 2; i += 1) {
viewRepaymentSchedulePage = loanAccountPage.navigateToIndividualRepaymentSchedulePage(i);
verifyRepaymentScheduleInstallmentsPaid(viewRepaymentSchedulePage, INDIVIDUAL_EXPECTED_PAID_INSTALLMENTS[i]);
loanAccountPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
}
// Test applying payment for last installment
applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
applyGroupPaymentPage.setPaymentMethod("1");
applyGroupPaymentPage.setAmount("1500");
applyGroupPaymentConfirmation = applyGroupPaymentPage.submit();
loanAccountPage = applyGroupPaymentConfirmation.submitAndNavigateToLoanAccountDetailsPage();
// Last installment left to payoff whole account
applyGroupPaymentPage = loanAccountPage.navigateToApplyGroupPayment();
applyGroupPaymentPage.verifyAmount("60.0");
applyGroupPaymentPage.verifyIndividualAmount(0, "15.7");
applyGroupPaymentPage.verifyIndividualAmount(1, "21.4");
applyGroupPaymentPage.verifyIndividualAmount(2, "22.9");
applyGroupPaymentPage.setPaymentMethod("1");
applyGroupPaymentConfirmation = applyGroupPaymentPage.submit();
loanAccountPage = applyGroupPaymentConfirmation.submitAndNavigateToLoanAccountDetailsPage();
loanAccountPage.verifyLoanStatus(LoanAccountPage.CLOSED);
}
Aggregations