Search in sources :

Example 1 with CreateClientConfirmationPage

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

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

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

the class ClientTestHelper method navigateToConfirmationPage.

private CreateClientConfirmationPage navigateToConfirmationPage(String loanOfficer) {
    CreateClientEnterMfiDataPage.SubmitFormParameters mfiFormParameters = new CreateClientEnterMfiDataPage.SubmitFormParameters();
    mfiFormParameters.setLoanOfficerId(loanOfficer);
    MeetingParameters meetingFormParameters = new MeetingParameters();
    meetingFormParameters.setWeekFrequency("1");
    meetingFormParameters.setWeekDay(MeetingParameters.WeekDay.WEDNESDAY);
    meetingFormParameters.setMeetingPlace("Bangalore");
    mfiFormParameters.setMeeting(meetingFormParameters);
    CreateClientPreviewDataPage clientPreviewDataPage = new CreateClientEnterMfiDataPage(selenium).submitAndGotoCreateClientPreviewDataPage(mfiFormParameters);
    CreateClientConfirmationPage clientConfirmationPage = clientPreviewDataPage.submit();
    clientConfirmationPage.verifyPage();
    return clientConfirmationPage;
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) 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 4 with CreateClientConfirmationPage

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

the class ClientTestHelper method navigateToClientViewDetails.

private ClientViewDetailsPage navigateToClientViewDetails(CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters) {
    ClientViewDetailsPage clientViewDetailsPage = new CreateClientConfirmationPage(selenium).navigateToClientViewDetailsPage();
    clientViewDetailsPage.verifyName(formParameters.getFirstName() + " " + formParameters.getLastName());
    clientViewDetailsPage.verifyDateOfBirth(formParameters.getDateOfBirthDD(), formParameters.getDateOfBirthMM(), formParameters.getDateOfBirthYYYY());
    clientViewDetailsPage.verifySpouseFather(formParameters.getSpouseFirstName() + " " + formParameters.getSpouseLastName());
    clientViewDetailsPage.verifyHandicapped(formParameters.getHandicapped());
    return clientViewDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) CreateClientConfirmationPage(org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage)

Aggregations

CreateClientConfirmationPage (org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage)4 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)3 CreateClientEnterMfiDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)3 CreateClientPreviewDataPage (org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage)3 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)2 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)1 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)1 Test (org.testng.annotations.Test)1