Search in sources :

Example 11 with LoanAccountPage

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

the class LoanTestHelper method verifyNoOneTimeFeeRemovalLinkExists.

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

Example 12 with LoanAccountPage

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

the class LoanTestHelper method createMultipleLoanAccountsWithMixedRestricedPoducts.

public CreateLoanAccountsSuccessPage createMultipleLoanAccountsWithMixedRestricedPoducts(CreateMultipleLoanAccountSelectParameters multipleAccParameters1, CreateMultipleLoanAccountSelectParameters multipleAccParameters2, DisburseLoanParameters disburseParams, String[] clients, String firstRepaymentDate) {
    navigationHelper.navigateToAdminPage().navigateToDefineProductMix().createOneMixAndNavigateToClientsAndAccounts(multipleAccParameters1.getLoanProduct(), multipleAccParameters2.getLoanProduct());
    CreateLoanAccountsSuccessPage createLoanAccountsSuccessPage = createMultipleLoanAccounts(multipleAccParameters1, clients, "0000-Animal Husbandry");
    List<String> accountNumbers = createLoanAccountsSuccessPage.verifyAndGetLoanAccountNumbers(clients.length);
    LoanAccountPage loanAccountPage = createLoanAccountsSuccessPage.selectLoansAndNavigateToLoanAccountPage(0);
    for (int i = 0; i < accountNumbers.size(); i++) {
        if (i > 0) {
            loanAccountPage = loanAccountPage.navigateToClientsAndAccountsUsingHeaderTab().searchForClient(accountNumbers.get(i)).navigateToLoanAccountSearchResult("Account # " + accountNumbers.get(i));
        }
        loanAccountPage.changeAccountStatusToAccepted();
        loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseParams).submitAndNavigateToLoanAccountPage();
        // additional schedule verification due to MIFOS-4943
        loanAccountPage.navigateToRepaymentSchedulePage();
        Assert.assertEquals(selenium.getTable("installments.3.1").trim(), firstRepaymentDate);
    }
    loanAccountPage.navigateToClientsAndAccountsUsingHeaderTab();
    return createMultipleLoanAccounts(multipleAccParameters2, clients, "0000-Animal Husbandry");
}
Also used : CreateLoanAccountsSuccessPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountsSuccessPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

Example 13 with LoanAccountPage

use of org.mifos.test.acceptance.framework.loan.LoanAccountPage 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 14 with LoanAccountPage

use of org.mifos.test.acceptance.framework.loan.LoanAccountPage 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 15 with LoanAccountPage

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

the class LoanTestHelper method makePayment.

public LoanAccountPage makePayment(DateTime paymentDate, String paymentAmount) throws UnsupportedEncodingException {
    PaymentParameters paymentParameters = setPaymentParams(paymentAmount, paymentDate);
    setApplicationTime(paymentDate).navigateBack();
    LoanAccountPage loanAccountPage = new LoanAccountPage(selenium).navigateToApplyPayment().submitAndNavigateToApplyPaymentConfirmationPage(paymentParameters).submitAndNavigateToLoanAccountDetailsPage();
    AccountActivityPage accountActivityPage = loanAccountPage.navigateToAccountActivityPage();
    accountActivityPage.verifyLastTotalPaid(paymentAmount, 2);
    accountActivityPage.navigateBack();
    return loanAccountPage;
}
Also used : AccountActivityPage(org.mifos.test.acceptance.framework.loan.AccountActivityPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

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