Search in sources :

Example 1 with DisburseLoanPage

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

Example 2 with DisburseLoanPage

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.");
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DisburseLoanPage(org.mifos.test.acceptance.framework.loan.DisburseLoanPage) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)

Example 3 with DisburseLoanPage

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

Aggregations

DisburseLoanPage (org.mifos.test.acceptance.framework.loan.DisburseLoanPage)3 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)2 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)1 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)1 DisburseLoanConfirmationPage (org.mifos.test.acceptance.framework.loan.DisburseLoanConfirmationPage)1 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)1 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)1 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)1 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)1