Search in sources :

Example 1 with AccountActivityPage

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;
}
Also used : AccountActivityPage(org.mifos.test.acceptance.framework.loan.AccountActivityPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Example 2 with AccountActivityPage

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();
}
Also used : AccountActivityPage(org.mifos.test.acceptance.framework.loan.AccountActivityPage)

Example 3 with AccountActivityPage

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");
}
Also used : AccountActivityPage(org.mifos.test.acceptance.framework.loan.AccountActivityPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage)

Example 4 with AccountActivityPage

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);
}
Also used : AccountActivityPage(org.mifos.test.acceptance.framework.loan.AccountActivityPage)

Example 5 with AccountActivityPage

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;
}
Also used : ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) AccountActivityPage(org.mifos.test.acceptance.framework.loan.AccountActivityPage) ApplyPaymentConfirmationPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

Aggregations

AccountActivityPage (org.mifos.test.acceptance.framework.loan.AccountActivityPage)5 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)3 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)2 ApplyPaymentConfirmationPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage)1 ApplyPaymentPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentPage)1 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)1