use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage in project head by mifos.
the class ClientTest method createClientWithMoreThanMaximumAgeTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createClientWithMoreThanMaximumAgeTest() throws Exception {
propertiesHelper.setMinimumAgeForClients(18);
propertiesHelper.setMaximumAgeForClients(60);
CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClient("MyOfficeDHMFT", "11", "12", "1940");
CreateClientEnterPersonalDataPage nextPage = clientPersonalDataPage.dontLoadNext();
nextPage.verifyPage("CreateClientPersonalInfo");
propertiesHelper.setMinimumAgeForClients(0);
propertiesHelper.setMaximumAgeForClients(0);
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage 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.CreateClientEnterPersonalDataPage in project head by mifos.
the class ClientTestHelper method createClientForFamilyInfo.
public CreateClientEnterPersonalDataPage createClientForFamilyInfo(String officeName, String dd, String mm, String yy) {
CreateClientEnterPersonalDataPage clientPersonalDataPage = navigateToPersonalDataPage(officeName);
CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
formParameters.setLastName("Customer" + StringUtil.getRandomString(8));
formParameters.setSalutation(CreateClientEnterPersonalDataPage.SubmitFormParameters.MRS);
formParameters.setFirstName("test");
formParameters.setDateOfBirthYYYY(yy);
formParameters.setLastName("Customer" + StringUtil.getRandomString(8));
formParameters.setDateOfBirthDD(dd);
formParameters.setDateOfBirthMM(mm);
formParameters.setGender(CreateClientEnterPersonalDataPage.SubmitFormParameters.FEMALE);
formParameters.setPovertyStatus(CreateClientEnterPersonalDataPage.SubmitFormParameters.POOR);
formParameters.setHandicapped("Yes");
return clientPersonalDataPage.createWithoutSpouse(formParameters);
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage in project head by mifos.
the class ClientTest method createClientWithCorrectAgeTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createClientWithCorrectAgeTest() throws Exception {
propertiesHelper.setMinimumAgeForClients(18);
propertiesHelper.setMaximumAgeForClients(60);
CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClient("MyOfficeDHMFT", "11", "12", "1987");
CreateClientEnterMfiDataPage nextPage = clientPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
nextPage.verifyPage("CreateClientMfiInfo");
propertiesHelper.setMinimumAgeForClients(0);
propertiesHelper.setMaximumAgeForClients(0);
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage 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);
}
Aggregations