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 AddFamilyDetailsTest method verifyCanAddAndDeleteRow.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyCanAddAndDeleteRow() throws Exception {
CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterFamilyDetailsPage();
clientFamilyDataPage.addRow();
Assert.assertTrue(selenium.isElementPresent("familyRelationship[1]"), "The element for familyRelationship in the added row was not found");
clientFamilyDataPage = clientFamilyDataPage.deleteRow();
Assert.assertFalse(selenium.isElementPresent("familyRelationship[1]"), "The element for familyRelationship in the deleted row was found");
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage 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");
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage in project head by mifos.
the class AddFamilyDetailsTest method verifyNoLivingStatus.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyNoLivingStatus() throws Exception {
CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterFamilyDetailsPage();
clientFamilyDataPage = clientTestHelper.createFamilyWithoutLookups(1, 49, 0, clientFamilyDataPage);
CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
nextPage.verifyPage("CreateClientFamilyInfo");
}
Aggregations