Search in sources :

Example 6 with CreateClientEnterPersonalDataPage

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);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) Test(org.testng.annotations.Test)

Example 7 with CreateClientEnterPersonalDataPage

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);
}
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 8 with CreateClientEnterPersonalDataPage

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);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)

Example 9 with CreateClientEnterPersonalDataPage

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);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage) Test(org.testng.annotations.Test)

Example 10 with CreateClientEnterPersonalDataPage

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);
}
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

CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)21 CreateClientEnterMfiDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)10 CreateClientEnterFamilyDetailsPage (org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage)8 CreateClientPreviewDataPage (org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage)8 Test (org.testng.annotations.Test)8 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)3 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)3 DefineHiddenMandatoryFieldsPage (org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage)3 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)2 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)2 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)2 CreateClientConfirmationPage (org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage)2 CreateGroupSearchPage (org.mifos.test.acceptance.framework.group.CreateGroupSearchPage)2 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)2 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)2 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