Search in sources :

Example 1 with CreateClientPreviewDataPage

use of org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage in project head by mifos.

the class AddFamilyDetailsTest method goToEditAfterPreviewPageTest.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void goToEditAfterPreviewPageTest() throws Exception {
    propertiesHelper.setMaximumNumberOfFamilyMemebers(10);
    CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
    CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterFamilyDetailsPage();
    clientFamilyDataPage = clientTestHelper.createFamily("fname", "lname", "11", "01", "1987", clientFamilyDataPage);
    CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
    CreateClientPreviewDataPage clientPreviewDataPage = clientTestHelper.createClientMFIInformationAndGoToPreviewPage("loan officer", nextPage);
    CreateClientEnterFamilyDetailsPage editPage = clientPreviewDataPage.edit();
    editPage.verifyPage("CreateClientFamilyInfo");
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientPreviewDataPage(org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage) CreateClientEnterFamilyDetailsPage(org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)

Example 2 with CreateClientPreviewDataPage

use of org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage in project head by mifos.

the class AddFamilyDetailsTest method goToPreviewPageAfterEnteringFamilyDetailsPageTest.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void goToPreviewPageAfterEnteringFamilyDetailsPageTest() throws Exception {
    propertiesHelper.setMaximumNumberOfFamilyMemebers(10);
    CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
    CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterFamilyDetailsPage();
    clientFamilyDataPage.verifyPage("CreateClientFamilyInfo");
    clientFamilyDataPage = clientTestHelper.createFamily("fname", "lname", "11", "01", "1987", clientFamilyDataPage);
    CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
    nextPage.verifyPage("CreateClientMfiInfo");
    CreateClientPreviewDataPage clientPreviewDataPage = clientTestHelper.createClientMFIInformationAndGoToPreviewPage("loan officer", nextPage);
    CreateClientEnterFamilyDetailsPage editPage = clientPreviewDataPage.edit();
    editPage.verifyPage("CreateClientFamilyInfo");
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientPreviewDataPage(org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage) CreateClientEnterFamilyDetailsPage(org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)

Example 3 with CreateClientPreviewDataPage

use of org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage in project head by mifos.

the class ClientTest method createClientOutsideGroup.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-236
@Test(enabled = true)
public void createClientOutsideGroup() throws Exception {
    // When
    CreateClientEnterPersonalDataPage clientPersonalDataPage = navigationHelper.navigateToCreateClientEnterPersonalDataPage(officeName);
    // we remember form parameters to verify MIFOS-5032
    CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters = FormParametersHelper.getClientEnterPersonalDataPageFormParameters();
    clientPersonalDataPage = clientPersonalDataPage.create(formParameters);
    CreateClientEnterMfiDataPage clientEnterMfiDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
    CreateClientEnterMfiDataPage.SubmitFormParameters parameters = new CreateClientEnterMfiDataPage.SubmitFormParameters();
    parameters.setLoanOfficerId("loan officer");
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("testMeetingPlace");
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
    parameters.setMeeting(meeting);
    CreateClientPreviewDataPage createClientPreviewDataPage = clientEnterMfiDataPage.submitAndGotoCreateClientPreviewDataPage(parameters);
    CreateClientConfirmationPage clientConfirmationPage = createClientPreviewDataPage.submit();
    // Then
    clientConfirmationPage.navigateToClientViewDetailsPage();
    // extension to verify MIFOS-5032
    clientPersonalDataPage = navigationHelper.navigateToCreateClientEnterPersonalDataPage(officeName);
    clientPersonalDataPage = clientPersonalDataPage.create(formParameters);
    clientEnterMfiDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
    createClientPreviewDataPage = clientEnterMfiDataPage.submitAndGotoCreateClientPreviewDataPage(parameters);
    createClientPreviewDataPage.submitWithOneError("The combination of the specified Date of Birth and name " + formParameters.getFirstName() + " " + formParameters.getLastName() + " already exists in the application. Please specify a different name.");
}
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) SubmitFormParameters(org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage) CreateClientConfirmationPage(org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage) Test(org.testng.annotations.Test)

Example 4 with CreateClientPreviewDataPage

use of org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage 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 5 with CreateClientPreviewDataPage

use of org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage in project head by mifos.

the class ClientTest method createClientAssignedGroup.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createClientAssignedGroup() throws Exception {
    GroupViewDetailsPage groupViewDetailsPage = navigationHelper.navigateToGroupViewDetailsPage("GroupWeekly");
    String groupMeetingSchedule = groupViewDetailsPage.getMeetingSchedule();
    String groupMeetingPlace = groupViewDetailsPage.getMeetingPlace();
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateClientEnterPersonalDataPage createClientEnterPersonalDataPage = clientsAndAccountsHomepage.navigateToCreateNewClientPage().selectGroup("GroupWeekly");
    String clientMeetingSchedule = createClientEnterPersonalDataPage.getMeetingSchedule();
    String clientMeetingPlace = createClientEnterPersonalDataPage.getMeetingPlace();
    Assert.assertEquals(groupMeetingSchedule, clientMeetingSchedule);
    Assert.assertEquals(groupMeetingPlace, clientMeetingPlace);
    CreateClientEnterPersonalDataPage.SubmitFormParameters parameters = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
    parameters = clientParams();
    CreateClientPreviewDataPage createClientPreviewDataPage = createClientEnterPersonalDataPage.createWithoutSpouse(parameters).submitAndGotoCreateClientEnterMfiDataPage().navigateToPreview();
    String clientPreviewMeetingSchedule = createClientPreviewDataPage.getMeetingSchedule();
    String clientPreviewMeetingPlace = createClientPreviewDataPage.getMeetingPlace();
    Assert.assertEquals(groupMeetingSchedule, clientPreviewMeetingSchedule);
    Assert.assertEquals(groupMeetingPlace, clientPreviewMeetingPlace);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientPreviewDataPage(org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) SubmitFormParameters(org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters) Test(org.testng.annotations.Test)

Aggregations

CreateClientPreviewDataPage (org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage)10 CreateClientEnterMfiDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)9 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)8 CreateClientEnterFamilyDetailsPage (org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage)5 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)3 CreateClientConfirmationPage (org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage)3 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)2 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)2 Test (org.testng.annotations.Test)2 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)1 ClientEditFamilyPage (org.mifos.test.acceptance.framework.client.ClientEditFamilyPage)1 ClientEditFamilyParameters (org.mifos.test.acceptance.framework.client.ClientEditFamilyParameters)1 ClientFamilyEditPreviewPage (org.mifos.test.acceptance.framework.client.ClientFamilyEditPreviewPage)1 GroupViewDetailsPage (org.mifos.test.acceptance.framework.group.GroupViewDetailsPage)1 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)1