Search in sources :

Example 26 with LoanTestHelper

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

the class UpdateCustomPropertiesTest method verifyPropertyPendingApprovalStateEnabledForSavingsAndLoanAccounts.

/*
     * 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-215
@Test(enabled = true)
public void verifyPropertyPendingApprovalStateEnabledForSavingsAndLoanAccounts() throws Exception {
    //Given
    propertiesHelper.setSavingsPendingApprovalStateEnabled("true");
    propertiesHelper.setLoanPendingApprovalStateEnabled("true");
    propertiesHelper.setGroupPendingApprovalStateEnabled("true");
    //When
    CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
    searchParameters.setSearchString("UpdateCustomProperties TestClient");
    searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
    CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
    submitAccountParameters.setAmount("248.0");
    SavingsAccountDetailPage savingsAccountPage = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters);
    savingsAccountPage.verifyPage();
    //Then
    savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
    savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
    savingsAccountPage.verifyStatus("Application Pending Approval");
    //when
    CreateLoanAccountSearchParameters searchParameters2 = new CreateLoanAccountSearchParameters();
    searchParameters2.setSearchString("UpdateCustomProperties TestClient");
    searchParameters2.setLoanProduct("ClientEmergencyLoan");
    CreateLoanAccountSubmitParameters submitAccountParameters2 = new CreateLoanAccountSubmitParameters();
    submitAccountParameters2.setAmount("2765.0");
    submitAccountParameters2.setGracePeriodTypeNone(true);
    LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
    LoanAccountPage loanAccountPage = loanTestHelper.createLoanAccount(searchParameters2, submitAccountParameters2);
    loanAccountPage.verifyStatus("Application Pending Approval");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateSavingsAccountSearchParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateSavingsAccountSubmitParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters) Test(org.testng.annotations.Test)

Example 27 with LoanTestHelper

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

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithTodayMeetingStartDateAndCurrentWeekDay.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithTodayMeetingStartDateAndCurrentWeekDay(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.FRIDAY);
    meeting.setMeetingStartDate("19/10/2012");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("19", "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 28 with LoanTestHelper

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

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithTodayMeetingStartDate.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithTodayMeetingStartDate(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("19/10/2012");
    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 29 with LoanTestHelper

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

the class MonthClosingTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    navigationHelper = new NavigationHelper(selenium);
    loanTestHelper = new LoanTestHelper(selenium);
    loanProductTestHelper = new LoanProductTestHelper(selenium);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanProductTestHelper(org.mifos.test.acceptance.loanproduct.LoanProductTestHelper) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 30 with LoanTestHelper

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

the class ClientTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    navigationHelper = new NavigationHelper(selenium);
    propertiesHelper = new CustomPropertiesHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    groupTestHelper = new GroupTestHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    savingsProductHelper = new SavingsProductHelper(selenium);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    targetTime = new DateTime(2009, 7, 11, 12, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    TestDataSetup dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
    feeTestHelper = new FeeTestHelper(dataSetup, navigationHelper);
    loanTestHelper = new LoanTestHelper(selenium);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) TestDataSetup(org.mifos.test.acceptance.util.TestDataSetup) FeeTestHelper(org.mifos.test.acceptance.admin.FeeTestHelper) GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) CustomPropertiesHelper(org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper) SavingsProductHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

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