Search in sources :

Example 56 with LoanAccountPage

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

the class LoanTestHelper method applyChargeUsingFeeLabel.

/**
     * Applies a charge to the loan account with id <tt>loanId</tt>.  Uses the fee label
     * rather than type value to select the fee.
     * @param loanId The account id.
     * @param params The charge parameters (amount and type).
     * @return The loan account page for the loan account.
     */
public LoanAccountPage applyChargeUsingFeeLabel(String loanId, ChargeParameters params) {
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
    ApplyChargePage applyChargePage = loanAccountPage.navigateToApplyCharge();
    loanAccountPage = applyChargePage.submitUsingLabelAndNavigateToApplyChargeConfirmationPage(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)

Example 57 with LoanAccountPage

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

the class LoanTestHelper method verifyOriginalValues.

public void verifyOriginalValues(CreateLoanAccountSearchParameters searchParams, String principal, String interest, String fees, String penalty, String total) {
    LoanAccountPage loanAccountPage = navigateToLoanAccountPage(searchParams);
    loanAccountPage.verifyPrincipalOriginal(principal);
    loanAccountPage.verifyInterestOriginal(interest);
    loanAccountPage.verifyFeesOriginal(fees);
    loanAccountPage.verifyPenaltyOriginal(penalty);
    loanAccountPage.verifyTotalOriginalLoan(total);
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

Example 58 with LoanAccountPage

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

the class NavigationHelper method navigateToLoanAccountPage.

public LoanAccountPage navigateToLoanAccountPage(String loanAccountID) {
    HomePage homePage = navigateToHomePage();
    SearchResultsPage searchResultsPage = homePage.search(loanAccountID);
    searchResultsPage.verifyPage();
    LoanAccountPage loanAccountPage = searchResultsPage.navigateToLoanAccountDetailPage(loanAccountID);
    return loanAccountPage;
}
Also used : SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage)

Example 59 with LoanAccountPage

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

the class HolidayTest method holidaysRepaymentRuleSameDayWithBatchJobs.

//http://mifosforge.jira.com/browse/MIFOSTEST-74
@Test(enabled = true)
public void holidaysRepaymentRuleSameDayWithBatchJobs() throws Exception {
    //Given
    dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2035, 1, 1, 13, 0, 0, 0));
    //When
    CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
    CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
    LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
    String lid = page.getAccountId();
    page.navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("12-Jan-2035", "19-Jan-2035", "26-Jan-2035", "02-Feb-2035", "09-Feb-2035", "16-Feb-2035", "23-Feb-2035", "02-Mar-2035", "09-Mar-2035", "16-Mar-2035");
    CreateHolidaySubmitParameters param = getHolidayParameters("2035");
    param.setRepaymentRule(CreateHolidaySubmitParameters.SAME_DAY);
    createHolidayForInstallments(param);
    //Then
    runBatchJobsForHoliday();
    navigationHelper.navigateToLoanAccountPage(lid).navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("12-Jan-2035", "19-Jan-2035", "26-Jan-2035", "02-Feb-2035", "09-Feb-2035", "16-Feb-2035", "23-Feb-2035", "02-Mar-2035", "09-Mar-2035", "16-Mar-2035");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) CreateHolidaySubmitParameters(org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 60 with LoanAccountPage

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

the class HolidayTest method holidaysRepaymentRuleNextWorkingDayWithBatchJobs.

//http://mifosforge.jira.com/browse/MIFOSTEST-76
@Test(enabled = true)
public void holidaysRepaymentRuleNextWorkingDayWithBatchJobs() throws Exception {
    //Given
    dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2036, 1, 1, 13, 0, 0, 0));
    //When
    CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
    CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
    LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
    String lid = page.getAccountId();
    page.navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "15-Feb-2036", "22-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
    CreateHolidaySubmitParameters param = getHolidayParameters("2036");
    param.setRepaymentRule(CreateHolidaySubmitParameters.NEXT_WORKING_DAY);
    createHolidayForInstallments(param);
    //Then
    runBatchJobsForHoliday();
    navigationHelper.navigateToLoanAccountPage(lid).navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "29-Feb-2036", "29-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) CreateHolidaySubmitParameters(org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

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