Search in sources :

Example 1 with DisburseLoanParameters

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

the class RemovePenaltiesTest method shouldRemovePenaltyBeforeDisbursal.

@Test(enabled = true)
public void shouldRemovePenaltyBeforeDisbursal() throws Exception {
    final String accountId = setUpPenaltyAndLoanAccount(false, PenaltyFormParameters.FREQUENCY_NONE);
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
    loanAccountPage.removeOneTimePenalty(1);
    loanAccountPage.verifyNoOneTimePenaltyRemovalLinkExists(1);
    final DisburseLoanParameters disburseParams = new DisburseLoanParameters();
    disburseParams.setAmount(loanAccountPage.getOriginalTotalAmount());
    disburseParams.setDisbursalDateDD("15");
    disburseParams.setDisbursalDateMM("2");
    disburseParams.setDisbursalDateYYYY("2012");
    disburseParams.setPaymentType(DisburseLoanParameters.CASH);
    loanAccountPage.changeAccountStatusToAccepted().disburseLoan(disburseParams);
    changeDateTime(04, 1);
    verifyCalculatePenaltyWithoutPenalty(accountId);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) Test(org.testng.annotations.Test)

Example 2 with DisburseLoanParameters

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

the class LoanTestHelper method setDisbursalParams.

public DisburseLoanParameters setDisbursalParams(ReadableInstant validDisbursalDate) {
    DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
    String dd = DateTimeFormat.forPattern("dd").print(validDisbursalDate);
    String mm = DateTimeFormat.forPattern("MM").print(validDisbursalDate);
    String yyyy = DateTimeFormat.forPattern("yyyy").print(validDisbursalDate);
    disburseLoanParameters.setDisbursalDateDD(dd);
    disburseLoanParameters.setDisbursalDateMM(mm);
    disburseLoanParameters.setDisbursalDateYYYY(yyyy);
    disburseLoanParameters.setPaymentType(DisburseLoanParameters.CASH);
    return disburseLoanParameters;
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)

Example 3 with DisburseLoanParameters

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

the class PenaltyHelper method createWeeklyLoanAccountWithPenalty.

public LoanAccountPage createWeeklyLoanAccountWithPenalty(final SubmitFormParameters formParameters, final String clientName, final boolean disbursal) throws Exception {
    navigationHelper.navigateToAdminPage().verifyPage().defineLoanProduct(formParameters);
    final CreateLoanAccountSearchParameters searchParam = new CreateLoanAccountSearchParameters();
    searchParam.setSearchString(clientName);
    searchParam.setLoanProduct(formParameters.getOfferingName());
    LoanAccountPage loanAccountPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParam).navigateToReviewInstallmentsPage().clickPreviewAndGoToReviewLoanAccountPage().submitForApprovalAndNavigateToConfirmationPage().navigateToLoanAccountDetailsPage();
    if (disbursal) {
        loanAccountPage.changeAccountStatusToAccepted();
        final DisburseLoanParameters disburseParams = new DisburseLoanParameters();
        disburseParams.setAmount(formParameters.getDefaultLoanAmount());
        disburseParams.setDisbursalDateDD("15");
        disburseParams.setDisbursalDateMM("2");
        disburseParams.setDisbursalDateYYYY("2012");
        disburseParams.setPaymentType(DisburseLoanParameters.CASH);
        loanAccountPage.disburseLoan(disburseParams);
    }
    return loanAccountPage;
}
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)

Example 4 with DisburseLoanParameters

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

the class LoanTestHelper method disburseLoan.

public void disburseLoan(DateTime disbursalDate) throws UnsupportedEncodingException {
    setApplicationTime(disbursalDate).navigateBack();
    DisburseLoanParameters disburseLoanParameters = setDisbursalParams(disbursalDate);
    LoanAccountPage loanAccountPage = new LoanAccountPage(selenium).navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseLoanParameters).submitAndNavigateToLoanAccountPage();
    loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

Example 5 with DisburseLoanParameters

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

the class CreateLSIMClientLoanAccountTest method createDisubreseLoanParameters.

private DisburseLoanParameters createDisubreseLoanParameters(String d, String m, String y) {
    DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
    disburseLoanParameters.setDisbursalDateDD(d);
    disburseLoanParameters.setDisbursalDateMM(m);
    disburseLoanParameters.setDisbursalDateYYYY(y);
    disburseLoanParameters.setPaymentType(PaymentParameters.CASH);
    return disburseLoanParameters;
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)

Aggregations

DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)40 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)29 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)26 DateTime (org.joda.time.DateTime)15 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)14 Test (org.testng.annotations.Test)14 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)13 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)11 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)10 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)8 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)7 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)6 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)5 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)5 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)4 HashMap (java.util.HashMap)3 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)3 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)3 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)3 ArrayList (java.util.ArrayList)2