Search in sources :

Example 6 with MeetingParameters

use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.

the class CenterTest method editingCenterMeetinSchedule.

// http://mifosforge.jira.com/browse/MIFOSTEST-1176
@Test(enabled = true)
public void editingCenterMeetinSchedule() {
    //Given
    String centerName = "DefineNewSavingsProductTestCenter";
    String groupName = "DefineNewSavingsProductTestGroup";
    String clientName = "DefineNewSavingsProduct TestClient";
    MeetingParameters parameters = new MeetingParameters();
    parameters.setWeekDay(MeetingParameters.WeekDay.THURSDAY);
    //When
    String meetingSchedule = centerTestHelper.editCenterMeetingSchedule(centerName, parameters).getMeetingSchedule();
    //Then
    clientTestHelper.verifyMeetingSchedule(clientName, meetingSchedule);
    groupTestHelper.verifyMeetingSchedule(groupName, meetingSchedule);
    parameters.setWeekDay(MeetingParameters.WeekDay.MONDAY);
    centerTestHelper.editCenterMeetingSchedule(centerName, parameters);
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) Test(org.testng.annotations.Test)

Example 7 with MeetingParameters

use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.

the class CenterTest method verifyApplyPaymentForCenterWithUnusualName.

@Test(enabled = true)
public void verifyApplyPaymentForCenterWithUnusualName() {
    String centerName = "`~!@#$%^&*()_+-=[];',./{}|:<>? Center";
    CreateCenterEnterDataPage.SubmitFormParameters formParameters = new CreateCenterEnterDataPage.SubmitFormParameters();
    formParameters.setCenterName(centerName);
    formParameters.setLoanOfficer("loan officer");
    MeetingParameters meeting = MeetingParameters.getRandomMeetingParameters();
    formParameters.setMeeting(meeting);
    centerTestHelper.createCenter(formParameters, "MyOfficeDHMFT");
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    ViewCenterChargesDetailPage viewCenterChargesDetailPage = navigationHelper.navigateToCenterViewDetailsPage(centerName).navigateToViewCenterChargesDetailPage();
    ApplyChargesPage applyChargesPage = viewCenterChargesDetailPage.navigateToApplyCharges();
    ChargeParameters chargeParameters = new ChargeParameters();
    chargeParameters.setAmount("100");
    chargeParameters.setType(ChargeParameters.MISC_FEES);
    viewCenterChargesDetailPage = applyChargesPage.applyChargeAndNaviagteToViewCenterChargesDetailPage(chargeParameters);
    ApplyPaymentPage applyPaymentPage = viewCenterChargesDetailPage.navigateToApplyPayments();
    PaymentParameters parameters = new PaymentParameters();
    DateTime dateTime = new DateTime();
    parameters.setAmount("100");
    parameters.setTransactionDateDD(Integer.toString(dateTime.getDayOfMonth()));
    parameters.setTransactionDateMM(Integer.toString(dateTime.getMonthOfYear()));
    parameters.setTransactionDateYYYY(Integer.toString(dateTime.getYear()));
    parameters.setPaymentType(PaymentParameters.CASH);
    ApplyPaymentConfirmationPage applyPaymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(parameters);
    //ElementPresent("css=form[name=applyPaymentActionForm]"));
    Assert.assertEquals(true, applyPaymentConfirmationPage.getSelenium().isTextPresent("Review transaction"));
}
Also used : CreateCenterEnterDataPage(org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) ApplyChargesPage(org.mifos.test.acceptance.framework.client.ApplyChargesPage) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters) DateTime(org.joda.time.DateTime) ViewCenterChargesDetailPage(org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage) MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) ApplyPaymentConfirmationPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters) Test(org.testng.annotations.Test)

Example 8 with MeetingParameters

use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.

the class ClientTestHelper method createClientWithCustomMFIInformation.

/**
     * Creates client for office and witch custom weekly meeting schedule.
     * @param loanOfficer assigned loan officer
     * @param office office's name
     * @param frequency weekly meeting frequency
     * @param weekDay day of the meeting
     * @param meetingPlace place of the meetings
     * @return
     */
public ClientViewDetailsPage createClientWithCustomMFIInformation(String loanOfficer, String office, String frequency, MeetingParameters.WeekDay weekDay, String meetingPlace) {
    CreateClientEnterPersonalDataPage clientPersonalDataPage = navigateToPersonalDataPage(office);
    CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters = FormParametersHelper.getClientEnterPersonalDataPageFormParameters();
    clientPersonalDataPage = clientPersonalDataPage.create(formParameters);
    clientPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
    CreateClientEnterMfiDataPage.SubmitFormParameters mfiFormParameters = new CreateClientEnterMfiDataPage.SubmitFormParameters();
    mfiFormParameters.setLoanOfficerId(loanOfficer);
    MeetingParameters meetingFormParameters = new MeetingParameters();
    meetingFormParameters.setWeekFrequency(frequency);
    meetingFormParameters.setWeekDay(weekDay);
    meetingFormParameters.setMeetingPlace(meetingPlace);
    mfiFormParameters.setMeeting(meetingFormParameters);
    CreateClientPreviewDataPage clientPreviewDataPage = new CreateClientEnterMfiDataPage(selenium).submitAndGotoCreateClientPreviewDataPage(mfiFormParameters);
    CreateClientConfirmationPage clientConfirmationPage = clientPreviewDataPage.submit();
    clientConfirmationPage.verifyPage();
    return navigateToClientViewDetails(formParameters);
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientPreviewDataPage(org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage) CreateClientConfirmationPage(org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage)

Example 9 with MeetingParameters

use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.

the class ClientTestHelper method createClientMFIInformationAndGoToPreviewPage.

public CreateClientPreviewDataPage createClientMFIInformationAndGoToPreviewPage(String loanOfficer, CreateClientEnterMfiDataPage clientMfiDataPage) {
    CreateClientEnterMfiDataPage.SubmitFormParameters mfiFormParameters = new CreateClientEnterMfiDataPage.SubmitFormParameters();
    mfiFormParameters.setLoanOfficerId(loanOfficer);
    MeetingParameters meetingFormParameters = new MeetingParameters();
    meetingFormParameters.setWeekFrequency("1");
    meetingFormParameters.setWeekDay(MeetingParameters.WeekDay.WEDNESDAY);
    meetingFormParameters.setMeetingPlace("Mangalore");
    mfiFormParameters.setMeeting(meetingFormParameters);
    return clientMfiDataPage.submitAndGotoCreateClientPreviewDataPage(mfiFormParameters);
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)

Example 10 with MeetingParameters

use of org.mifos.test.acceptance.framework.center.MeetingParameters in project head by mifos.

the class TestDataSetup method setMeetingScheduleParameters.

private MeetingParameters setMeetingScheduleParameters() {
    MeetingParameters meetingParameters = new MeetingParameters();
    meetingParameters.setMeetingPlace("test_location");
    meetingParameters.setWeekFrequency("1");
    meetingParameters.setWeekDay(MeetingParameters.WeekDay.TUESDAY);
    return meetingParameters;
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters)

Aggregations

MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)17 DateTime (org.joda.time.DateTime)7 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)6 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)6 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)5 Test (org.testng.annotations.Test)5 CreateClientEnterMfiDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)4 CreateClientConfirmationPage (org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage)3 CreateClientPreviewDataPage (org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage)3 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)2 ApplyPaymentPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentPage)2 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)2 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)2 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)1 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)1 CenterViewDetailsPage (org.mifos.test.acceptance.framework.center.CenterViewDetailsPage)1 ViewCenterChargesDetailPage (org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage)1 ApplyChargesPage (org.mifos.test.acceptance.framework.client.ApplyChargesPage)1 ApplyPaymentConfirmationPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage)1