use of org.mifos.test.acceptance.framework.loan.AccountActivityPage 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;
}
use of org.mifos.test.acceptance.framework.loan.AccountActivityPage in project head by mifos.
the class ApplyChargeGroupLoanTest method verifyPenaltySummaryAndActivity.
private void verifyPenaltySummaryAndActivity(LoanAccountPage loanAccountPage, String penalty, String activity, int row) {
Assert.assertEquals(loanAccountPage.getPenaltyPaid(), "0");
Assert.assertEquals(loanAccountPage.getPenaltyBalance(), penalty);
AccountActivityPage accountActivityPage = loanAccountPage.navigateToAccountActivityPage();
Assert.assertEquals(accountActivityPage.getLastPenalty(row), penalty);
Assert.assertEquals(accountActivityPage.getActivity(row), activity);
loanAccountPage.navigateBack();
}
use of org.mifos.test.acceptance.framework.loan.AccountActivityPage in project head by mifos.
the class LoanRepayTest method verifyAccountActivity.
private void verifyAccountActivity() {
LoanAccountPage accountPage = navigationHelper.navigateToLoanAccountPage(loanId);
AccountActivityPage accountActivityPage = accountPage.navigateToAccountActivityPage();
Assert.assertEquals(accountActivityPage.getLastPrinciplePaid(2), "1,000");
Assert.assertEquals(accountActivityPage.getLastInterestPaid(2), "4.6");
Assert.assertEquals(accountActivityPage.getLastFeePaid(2).trim(), "10");
Assert.assertEquals(accountActivityPage.getLastPenalty(2), "5");
Assert.assertEquals(accountActivityPage.getLastTotalPaid(2), "1,019.6");
Assert.assertEquals(accountActivityPage.getRunningPrinciple(2), "0");
Assert.assertEquals(accountActivityPage.getRunningInterest(2), "0");
Assert.assertEquals(accountActivityPage.getRunningFees(2), "0");
Assert.assertEquals(accountActivityPage.getRunningTotal(2), "0");
}
use of org.mifos.test.acceptance.framework.loan.AccountActivityPage in project head by mifos.
the class PenaltyTest method verifySummaryAndActivity.
private void verifySummaryAndActivity(LoanAccountPage loanAccountPage, String penalty, String penaltyBalance, String activity, int row) {
Assert.assertEquals(loanAccountPage.getPenaltyPaid(), "0");
Assert.assertEquals(loanAccountPage.getPenaltyBalance(), penaltyBalance);
AccountActivityPage accountActivityPage = loanAccountPage.navigateToAccountActivityPage();
Assert.assertEquals(accountActivityPage.getLastPenalty(row), penalty);
Assert.assertEquals(accountActivityPage.getActivity(row), activity);
}
use of org.mifos.test.acceptance.framework.loan.AccountActivityPage in project head by mifos.
the class LoanTestHelper method applyPayment.
/**
* Applies a payment to the loan account with id <tt>loanId</tt>.
* @param loanId The account id.
* @param paymentParams The payment parameters.
* @return The loan account page for the loan account.
*/
public LoanAccountPage applyPayment(String loanId, PaymentParameters paymentParams) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
ApplyPaymentPage applyPaymentPage = loanAccountPage.navigateToApplyPayment();
ApplyPaymentConfirmationPage applyPaymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParams);
loanAccountPage = applyPaymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
AccountActivityPage accountActivityPage = loanAccountPage.navigateToAccountActivityPage();
accountActivityPage.verifyLastTotalPaid(paymentParams.getAmount(), 2);
accountActivityPage.navigateBack();
return loanAccountPage;
}
Aggregations