Search in sources :

Example 11 with DefineNewLoanProductPage

use of org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage in project head by mifos.

the class BackDateLoanProductTest method cannotCreateLoanProductMoreThanOneYearInFutureWhenBackDatingIsEnabled.

@Test(enabled = true)
public void cannotCreateLoanProductMoreThanOneYearInFutureWhenBackDatingIsEnabled() {
    propertiesHelper.setBackDatedLoanProductCreationAllowed(true);
    DefineNewLoanProductPage newLoanProductPage = preparePageForTest();
    newLoanProductPage.fillStartDate("9999", "11", "11");
    newLoanProductPage = newLoanProductPage.submitWithErrors();
    Assert.isTrue(newLoanProductPage.getSelenium().isTextPresent("The Start date can be anything up to 1 year" + " from the current date."));
}
Also used : DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) Test(org.testng.annotations.Test)

Example 12 with DefineNewLoanProductPage

use of org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage in project head by mifos.

the class BackDateLoanProductTest method preparePageForTest.

private DefineNewLoanProductPage preparePageForTest() {
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    DefineNewLoanProductPage newLoanProductPage = adminPage.navigateToDefineLoanProduct();
    SubmitFormParameters parameters = FormParametersHelper.getMonthlyLoanProductParameters();
    return newLoanProductPage.fillLoanParameters(parameters);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)

Example 13 with DefineNewLoanProductPage

use of org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage in project head by mifos.

the class BackDateLoanProductTest method canCreateLoanProductInPastWhenBackDatingIsEnabled.

@Test(enabled = true)
public void canCreateLoanProductInPastWhenBackDatingIsEnabled() {
    propertiesHelper.setBackDatedLoanProductCreationAllowed(true);
    DefineNewLoanProductPage newLoanProductPage = preparePageForTest();
    newLoanProductPage.fillStartDate("1111", "11", "11");
    DefineNewLoanProductPreviewPage previewPage = newLoanProductPage.submitAndGotoNewLoanProductPreviewPage();
    previewPage.submit();
}
Also used : DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) DefineNewLoanProductPreviewPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPreviewPage) Test(org.testng.annotations.Test)

Aggregations

DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)13 Test (org.testng.annotations.Test)5 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)3 DefineNewLoanProductPreviewPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPreviewPage)3 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)3 DateTime (org.joda.time.DateTime)2 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)2 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)2 EditLoanProductPreviewPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage)2 ArrayList (java.util.ArrayList)1 Calendar (java.util.Calendar)1 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)1 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)1 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)1 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)1 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)1 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)1 EditLoanAccountInformationParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters)1 RepayLoanPage (org.mifos.test.acceptance.framework.loan.RepayLoanPage)1 RepayLoanParameters (org.mifos.test.acceptance.framework.loan.RepayLoanParameters)1