Search in sources :

Example 16 with CreateClientEnterPersonalDataPage

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

the class NavigationHelper method navigateToCreateClientEnterMfiDataPage.

public CreateClientEnterMfiDataPage navigateToCreateClientEnterMfiDataPage(String officeName) {
    CreateClientEnterPersonalDataPage clientPersonalDataPage = navigateToCreateClientEnterPersonalDataPage(officeName);
    CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters = FormParametersHelper.getClientEnterPersonalDataPageFormParameters();
    clientPersonalDataPage = clientPersonalDataPage.create(formParameters);
    return clientPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)

Example 17 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 18 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)

Example 19 with CreateClientEnterPersonalDataPage

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

the class ClientTest method verifyErrorsMessages.

@Test(singleThreaded = true, groups = { "smoke", "client", "acceptance", "ui", "no_db_unit" }, enabled = true)
public void verifyErrorsMessages() {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    DefineHiddenMandatoryFieldsPage mandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
    mandatoryFieldsPage.checkMandatoryCitizenShip();
    mandatoryFieldsPage.checkMandatoryEthnicity();
    mandatoryFieldsPage.checkMandatoryMaritalStatus();
    mandatoryFieldsPage.submit();
    CreateClientEnterPersonalDataPage personalDataPage = navigationHelper.navigateToCreateClientEnterPersonalDataPage(officeName);
    String[] errors = personalDataPage.getMandatoryBlankFieldsNames();
    String[] fields = new String[] { "Salutation", "First Name", "Last Name", "Date of birth", "Gender", "Ethnicity", "Citizenship", "Poverty status", "Marital Status" };
    for (int i = 0; i < fields.length; ++i) {
        Assert.assertEquals(fields[i], errors[i]);
    }
    adminPage = navigationHelper.navigateToAdminPage();
    adminPage.navigateToDefineHiddenMandatoryFields();
    mandatoryFieldsPage.uncheckMandatoryCitizenShip();
    mandatoryFieldsPage.uncheckMandatoryEthnicity();
    mandatoryFieldsPage.uncheckMandatoryMaritalStatus();
    mandatoryFieldsPage.submit();
    adminPage.logout();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) DefineHiddenMandatoryFieldsPage(org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage) Test(org.testng.annotations.Test)

Example 20 with CreateClientEnterPersonalDataPage

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

the class ClientTestHelper method createClientWithQuestionGroups.

public ClientViewDetailsPage createClientWithQuestionGroups(String loanOfficer, String officeName, Map<String, String> choiceTags, String answer) {
    CreateClientEnterPersonalDataPage clientPersonalDataPage = navigateToPersonalDataPage(officeName);
    CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters = FormParametersHelper.getClientEnterPersonalDataPageFormParameters();
    clientPersonalDataPage = clientPersonalDataPage.create(formParameters);
    QuestionResponsePage questionResponsePage = clientPersonalDataPage.submitAndGotoCaptureQuestionResponsePage();
    questionResponsePage.populateTextAnswer("name=questionGroups[0].sectionDetails[0].questions[0].value", answer);
    questionResponsePage.populateSmartSelect("txtListSearch", choiceTags);
    questionResponsePage.navigateToNextPage();
    navigateToConfirmationPage(loanOfficer);
    return navigateToClientViewDetails(formParameters);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) QuestionResponsePage(org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)

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