use of org.mifos.test.acceptance.framework.loan.DisburseLoanPage in project head by mifos.
the class LoanTestHelper method disburseLoanWithWrongParams.
public void disburseLoanWithWrongParams(String loanId, DisburseLoanParameters params, String msg) {
DisburseLoanPage disburseLoanPage = prepareToDisburseLoan(loanId);
disburseLoanPage.submitWithWrongParams(params, msg);
prepareToDisburseLoan(loanId);
}
use of org.mifos.test.acceptance.framework.loan.DisburseLoanPage in project head by mifos.
the class ClientLoanDisbursalTest method verifyAcceptedPaymentTypesForDisbursementsOfLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-249
void verifyAcceptedPaymentTypesForDisbursementsOfLoan() throws Exception, InterruptedException {
// When
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.VOUCHER);
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
searchParams.setSearchString("Stu1233266063395 Client1233266063395");
//Extension https://mifosforge.jira.com/browse/MIFOSTEST-1194
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
DisburseLoanPage disburseLoanPage = loanAccountPage.navigateToDisburseLoan();
DisburseLoanParameters params = new DisburseLoanParameters();
params.setDisbursalDateDD("20");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
params.setPaymentType(params.CASH);
disburseLoanPage.verifyDisbursalDateIsFutureDate(params);
//disburseLoanPage.submitWithWrongParams(params, "Date of transaction can not be a future date");
params.setDisbursalDateDD("01");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
disburseLoanPage.verifyDisbursalDateIsPriorToClientMeetingSchedule(params);
params.setDisbursalDateDD("04");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.submitAndNavigateToDisburseLoanConfirmationPage(params).submitAndNavigateToLoanAccountPage();
String[] locators = { "Payment rcvd.", "accountActivityTable.2.1" };
loanAccountPage.navigateToViewLoanAccountActivityPage().verifyAllElementsArePresent(locators);
//When
disburseLoanPage = navigationHelper.navigateToLoanAccountPage("000100000000020").navigateToDisburseLoan();
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.verifyPaymentModesOfPaymentAreEmpty();
disburseLoanPage.verifyPaymentModeOfPaymentIsEditable("payment mode of payment must be editable when a disbursal fee exists.");
}
use of org.mifos.test.acceptance.framework.loan.DisburseLoanPage in project head by mifos.
the class LoanTestHelper method disburseLoan.
/**
* Disburses the loan with id <tt>loanId</tt>.
* @param loanId The system/global id of the loan that'll be disbursed.
* @param disburseParameters The disbursal parameters.
* @return The loan account page of the loan account with id loanId.
*/
public LoanAccountPage disburseLoan(String loanId, DisburseLoanParameters disburseParameters) {
DisburseLoanPage disburseLoanPage = prepareToDisburseLoan(loanId);
DisburseLoanConfirmationPage disburseLoanConfirmationPage = disburseLoanPage.submitAndNavigateToDisburseLoanConfirmationPage(disburseParameters);
LoanAccountPage loanAccountPage = disburseLoanConfirmationPage.submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
return loanAccountPage;
}
Aggregations