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.");
}
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);
}
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;
}
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;
}
Aggregations