Search in sources :

Example 1 with LoanTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithMeetingStartDateInTheFutureWithSameWeekDays.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithMeetingStartDateInTheFutureWithSameWeekDays(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.WEDNESDAY);
    meeting.setMeetingStartDate("31/10/2012");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("31", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 2 with LoanTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithMeetingStartDateInThePast.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithMeetingStartDateInThePast(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
    meeting.setMeetingStartDate("10/10/2000");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("22", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 3 with LoanTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithDefaultMeetingStartDate.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithDefaultMeetingStartDate(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
    meeting.setMeetingStartDate(null);
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("22", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 4 with LoanTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper in project head by mifos.

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithMeetingStartDateInTheFuture.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithMeetingStartDateInTheFuture(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.WEDNESDAY);
    meeting.setMeetingStartDate("25/10/2012");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("31", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 5 with LoanTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper in project head by mifos.

the class UpdateCustomPropertiesTest method verifyPropertyGroupCanApplyLoansTrue.

/*
     * FIXME - keithw - test passes when run individually but not as part of ci build. it appears that question groups data is not
     *                  cleaned up right as instead of stepping to review installments, the questionnaire page is presented.
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-234
@Test(enabled = true)
public void verifyPropertyGroupCanApplyLoansTrue() throws Exception {
    //Given
    propertiesHelper.setGroupCanApplyLoans("true");
    LoanTestHelper helper = new LoanTestHelper(selenium);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("UpdateCustomPropertiesTestGroup");
    searchParameters.setLoanProduct("GroupEmergencyLoan");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("2000.0");
    //When Then
    helper.createLoanAccount(searchParameters, submitAccountParameters);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) Test(org.testng.annotations.Test)

Aggregations

LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)51 BeforeMethod (org.testng.annotations.BeforeMethod)38 DateTime (org.joda.time.DateTime)32 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)23 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)21 LoanProductTestHelper (org.mifos.test.acceptance.loanproduct.LoanProductTestHelper)12 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)10 TestDataSetup (org.mifos.test.acceptance.util.TestDataSetup)10 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)7 FeeTestHelper (org.mifos.test.acceptance.admin.FeeTestHelper)6 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)6 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)6 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)5 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)4 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)4 ClientTestHelper (org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper)4 Test (org.testng.annotations.Test)4 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)3 Random (java.util.Random)2 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)2