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;
}
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);
}
Aggregations