Search in sources :

Example 1 with RepayLoanConfirmationPage

use of org.mifos.test.acceptance.framework.loan.RepayLoanConfirmationPage in project head by mifos.

the class LoanTestHelper method repayLoan.

/**
     * Repay loan account with id <tt>loanId</tt>.
     * @param loanId The account id.
     * @return The loan account page for the loan account.
     */
public LoanAccountPage repayLoan(String loanId) {
    RepayLoanParameters params = new RepayLoanParameters();
    params.setModeOfRepayment(RepayLoanParameters.CASH);
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
    RepayLoanPage repayLoanPage = loanAccountPage.navigateToRepayLoan();
    RepayLoanConfirmationPage repayLoanConfirmationPage = repayLoanPage.submitAndNavigateToRepayLoanConfirmationPage(params);
    loanAccountPage = repayLoanConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
    loanAccountPage.verifyStatus(LoanAccountPage.CLOSED);
    return loanAccountPage;
}
Also used : RepayLoanConfirmationPage(org.mifos.test.acceptance.framework.loan.RepayLoanConfirmationPage) RepayLoanPage(org.mifos.test.acceptance.framework.loan.RepayLoanPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) RepayLoanParameters(org.mifos.test.acceptance.framework.loan.RepayLoanParameters)

Example 2 with RepayLoanConfirmationPage

use of org.mifos.test.acceptance.framework.loan.RepayLoanConfirmationPage in project head by mifos.

the class LoanRepayTest method verifySelectionInConfirmationPage.

private void verifySelectionInConfirmationPage(RepayLoanPage repayLoanPage, String waiveInterestConfirmationText) {
    RepayLoanConfirmationPage repayLoanConfirmationPage = repayLoanPage.submitAndNavigateToRepayLoanConfirmationPage(getRepayLoanParameters());
    Assert.assertEquals(repayLoanConfirmationPage.getSelectedValueForInterestWaiver(), waiveInterestConfirmationText);
    repayLoanPage = repayLoanConfirmationPage.edit();
    boolean stateToBeRetainedDuringEdit = StringUtils.equals("Yes", waiveInterestConfirmationText);
    Assert.assertEquals(repayLoanPage.isWaiveInterestSelected(), stateToBeRetainedDuringEdit);
}
Also used : RepayLoanConfirmationPage(org.mifos.test.acceptance.framework.loan.RepayLoanConfirmationPage)

Aggregations

RepayLoanConfirmationPage (org.mifos.test.acceptance.framework.loan.RepayLoanConfirmationPage)2 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)1 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)1 RepayLoanPage (org.mifos.test.acceptance.framework.loan.RepayLoanPage)1 RepayLoanParameters (org.mifos.test.acceptance.framework.loan.RepayLoanParameters)1