Search in sources :

Example 66 with LoanAccountPage

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

the class LoanTestHelper method createTwoLoanAccountsWithMixedRestricedPoducts.

public LoanAccountPage createTwoLoanAccountsWithMixedRestricedPoducts(CreateLoanAccountSearchParameters searchParams1, CreateLoanAccountSearchParameters searchParams2, DisburseLoanParameters disburseParams, DateTime disbursalDate) {
    LoanAccountPage loanAccountPage = navigationHelper.navigateToAdminPage().navigateToDefineProductMix().createOneMixAndNavigateToClientsAndAccounts(searchParams1.getLoanProduct(), searchParams2.getLoanProduct()).navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams1).setDisbursalDate(disbursalDate).continuePreviewSubmitAndNavigateToDetailsPage();
    loanAccountPage.changeAccountStatusToAccepted();
    loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseParams).submitAndNavigateToLoanAccountPage();
    // create second account and try to disburse
    return loanAccountPage.navigateToClientsAndAccountsUsingHeaderTab().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams2).setDisbursalDate(disbursalDate).continuePreviewSubmitAndNavigateToDetailsPage().changeAccountStatusToAccepted().tryNavigatingToDisburseLoanWithError();
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

Example 67 with LoanAccountPage

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

the class LoanTestHelper method createActivateDisburstAndApplyPaymentForDefaultLoanAccount.

public LoanAccountPage createActivateDisburstAndApplyPaymentForDefaultLoanAccount(String clientName, String dd, String mm, String yy) {
    CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
    searchParams.setSearchString(clientName);
    searchParams.setLoanProduct("WeeklyClientFlatLoanWithNoFee");
    DisburseLoanParameters disburseParams = new DisburseLoanParameters();
    disburseParams.setDisbursalDateDD(dd);
    disburseParams.setDisbursalDateMM(mm);
    disburseParams.setDisbursalDateYYYY(yy);
    disburseParams.setPaymentType(PaymentParameters.CASH);
    disburseParams.setAmount("10,000");
    LoanAccountPage loanAccountPage = createActivateAndDisburseDefaultLoanAccount(searchParams, disburseParams);
    String accountID = loanAccountPage.getAccountId();
    PaymentParameters paymentParams = new PaymentParameters();
    paymentParams.setTransactionDateDD(dd);
    paymentParams.setTransactionDateMM(mm);
    paymentParams.setTransactionDateYYYY(yy);
    paymentParams.setPaymentType(PaymentParameters.CASH);
    paymentParams.setAmount("1");
    paymentParams.setReceiptId("");
    paymentParams.setReceiptDateDD("");
    paymentParams.setReceiptDateMM("");
    paymentParams.setReceiptDateYYYY("");
    return applyPayment(accountID, paymentParams);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) 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 68 with LoanAccountPage

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

the class LoanTestHelper method applyChargeToGroupLoan.

/**
     * Applies a charge to the group loan account with id <tt>loanId</tt>.  
     * @param loanId The account id.
     * @param params The charge parameters (amount, type and list of amounts for member accounts).
     * @return The loan account page for the group loan account.
     */
public LoanAccountPage applyChargeToGroupLoan(String loanId, ChargeParameters params) {
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
    ApplyChargePage applyChargePage = loanAccountPage.navigateToApplyCharge();
    DivideGroupChargesPage divideGroupChargesPage = applyChargePage.submitAndNavigateToDivideGroupChargesPage(params);
    loanAccountPage = divideGroupChargesPage.submitAndNavigateToLoanAccountPage(params);
    return loanAccountPage;
}
Also used : ApplyChargePage(org.mifos.test.acceptance.framework.loan.ApplyChargePage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) DivideGroupChargesPage(org.mifos.test.acceptance.framework.loan.DivideGroupChargesPage)

Example 69 with LoanAccountPage

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

the class LoanTestHelper method removePeriodicFee.

public void removePeriodicFee(int feeIndex) {
    LoanAccountPage loanAccountPage = new LoanAccountPage(selenium);
    loanAccountPage.removePeriodicFee(feeIndex);
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

Example 70 with LoanAccountPage

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

the class LoanTestHelper method applyCharge.

public LoanAccountPage applyCharge(String feeName, String amount) {
    ChargeParameters chargeParameters = new ChargeParameters();
    chargeParameters.setType(feeName);
    chargeParameters.setAmount(amount);
    return new LoanAccountPage(selenium).navigateToApplyCharge().submitAndNavigateToApplyChargeConfirmationPage(chargeParameters);
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Aggregations

LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)130 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)50 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)37 Test (org.testng.annotations.Test)36 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)29 DateTime (org.joda.time.DateTime)28 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)22 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)20 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)16 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)15 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)14 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)10 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)10 ArrayList (java.util.ArrayList)9 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)9 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)9 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)9 ChargeParameters (org.mifos.test.acceptance.framework.loan.ChargeParameters)8 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)8 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)8