use of org.mifos.test.acceptance.framework.loan.ApplyAdjustmentPage in project head by mifos.
the class RedoLoanDisbursalTest method redoLoanDisbursalWithPastDateUnpaid.
/*
* Verify that the status of the loan is Active in Good Standing
* when the loan is not wholly paid off before current date.
* Also verifies that loan cannot be redone on a date equal to
* or greater than the current date.
*
* http://mifosforge.jira.com/browse/MIFOSTEST-15
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void redoLoanDisbursalWithPastDateUnpaid() throws Exception {
// Testing redo loan
RedoLoanDisbursalParameters paramsPastDate = new RedoLoanDisbursalParameters();
paramsPastDate.setDisbursalDateDD("25");
paramsPastDate.setDisbursalDateMM("02");
paramsPastDate.setDisbursalDateYYYY("2011");
paramsPastDate.setLoanAmount("3000.0");
paramsPastDate.setInterestRate("10");
paramsPastDate.setNumberOfInstallments("52");
RedoLoanDisbursalParameters paramsCurrentDate = new RedoLoanDisbursalParameters();
paramsCurrentDate.setDisbursalDateDD("22");
paramsCurrentDate.setDisbursalDateMM("2");
paramsCurrentDate.setDisbursalDateYYYY("2012");
LoanAccountPage loanAccountPage = loanTestHelper.redoLoanDisbursal("Default Group", "WeeklyGroupFlatLoanWithOnetimeFee", paramsPastDate, paramsCurrentDate, 0, true);
loanAccountPage.verifyStatus("Active in Good Standing");
loanAccountPage.verifyPerformanceHistory("51", "0");
// Testing multiple reverse payments
String payAmount = "63";
String reverseNote = "Reversed ";
int loanBalance = (int) (Float.parseFloat(loanAccountPage.getTotalBalance()) + 63 * 3);
for (int i = 0; i < 3; i++) {
ApplyAdjustmentPage applyAdjustmentPage = loanAccountPage.navigateToApplyAdjustment();
applyAdjustmentPage.verifyAdjustment(payAmount, reverseNote + (i + 1));
}
verifyMultipleReversePayments(loanAccountPage, payAmount, reverseNote, loanBalance);
}
use of org.mifos.test.acceptance.framework.loan.ApplyAdjustmentPage in project head by mifos.
the class PenaltyTest method verifyRepaymentSchelude.
private void verifyRepaymentSchelude(LoanAccountPage loanAccountPage, String penalty, String payment, String diff) {
DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
disburseLoanParameters.setPaymentType(DisburseLoanParameters.CASH);
loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseLoanParameters).submitAndNavigateToLoanAccountPage();
ViewRepaymentSchedulePage repaymentSchedulePage = loanAccountPage.navigateToRepaymentSchedulePage();
repaymentSchedulePage.verifyRepaymentScheduleTablePenalties(3, penalty);
ApplyPaymentPage paymentPage = repaymentSchedulePage.navigateToApplyPaymentPage();
PaymentParameters paymentParameters = new PaymentParameters();
paymentParameters.setTransactionDateDD("28");
paymentParameters.setTransactionDateMM("02");
paymentParameters.setTransactionDateYYYY("2011");
paymentParameters.setAmount(payment);
paymentParameters.setPaymentType(PaymentParameters.CASH);
paymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParameters).submitAndNavigateToLoanAccountDetailsPage().navigateToRepaymentSchedulePage();
repaymentSchedulePage.verifyRepaymentScheduleTableRow(3, 6, payment);
repaymentSchedulePage.verifyRepaymentScheduleTableRow(3, 8, payment);
repaymentSchedulePage.verifyRepaymentScheduleTableRow(5, 6, diff);
repaymentSchedulePage.verifyRunningBalanceTableRow(3, 3, diff);
ApplyAdjustmentPage adjustmentPage = repaymentSchedulePage.navigateToApplyAdjustment();
adjustmentPage.fillAdjustmentFieldsAndSubmit(payment).navigateToRepaymentSchedulePage();
repaymentSchedulePage.verifyRepaymentScheduleTablePenalties(3, penalty);
}
Aggregations