Search in sources :

Example 6 with ClientViewDetailsPage

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

the class ClientTestHelper method changeCustomerStatus.

public ClientViewDetailsPage changeCustomerStatus(String clientName, EditCustomerStatusParameters editCustomerStatusParameters) {
    ClientViewDetailsPage clientDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
    CustomerChangeStatusPage statusChangePage = clientDetailsPage.navigateToCustomerChangeStatusPage();
    CustomerChangeStatusPreviewPage statusPreviewPage = statusChangePage.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
    ClientViewDetailsPage newClientDetailsPage = statusPreviewPage.submitAndGotoClientViewDetailsPage();
    newClientDetailsPage.verifyStatus(editCustomerStatusParameters.getClientStatus().getStatusText());
    newClientDetailsPage.verifyNotes(editCustomerStatusParameters.getNote());
    return newClientDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) CustomerChangeStatusPreviewPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)

Example 7 with ClientViewDetailsPage

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

the class QuestionGroupTestHelper method attachQuestionGroup.

public ClientViewDetailsPage attachQuestionGroup(String clientName, String questionGroupTitle, List<String> sections, Map<String, String> answers) {
    AttachSurveyPage attachSurveyPage = navigationHelper.navigateToClientViewDetailsPage(clientName).navigateToAttachSurveyPage();
    QuestionnairePage questionnairePage = attachSurveyPage.selectSurvey(questionGroupTitle);
    for (String section : sections) {
        questionnairePage.verifyTextPresent(section, clientName);
    }
    for (String question : answers.keySet()) {
        questionnairePage.setResponse(question, answers.get(question));
    }
    return (ClientViewDetailsPage) questionnairePage.submit();
}
Also used : AttachSurveyPage(org.mifos.test.acceptance.framework.loan.AttachSurveyPage) QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 8 with ClientViewDetailsPage

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

the class ClientTest method changeClientStatusToCancelWithReason.

private ClientViewDetailsPage changeClientStatusToCancelWithReason(String note, CancelReason reason, ClientViewDetailsPage clientDetailsPage) {
    String STATUS_CANCELLED = "Cancelled";
    //prepare parameters
    EditCustomerStatusParameters statusParameters = new EditCustomerStatusParameters();
    statusParameters.setClientStatus(ClientStatus.CANCELLED);
    statusParameters.setNote(note);
    statusParameters.setCancelReason(reason);
    //change status
    ClientViewDetailsPage newClientDetailsPage = clientTestHelper.changeCustomerStatus(clientDetailsPage.getHeading(), statusParameters);
    //verify that status has changed
    newClientDetailsPage.verifyStatus(STATUS_CANCELLED);
    return clientDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)

Example 9 with ClientViewDetailsPage

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

the class ClientTest method changeClientStatusToPartialAndVerify.

private ClientViewDetailsPage changeClientStatusToPartialAndVerify(ClientViewDetailsPage clientDetailsPage) {
    String STATUS_PARTIAL_APPLICATION = "Partial Application";
    //change status
    ClientViewDetailsPage newClientDetailsPage = clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.PARTIAL);
    //verify
    newClientDetailsPage.verifyStatus(STATUS_PARTIAL_APPLICATION);
    return clientDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 10 with ClientViewDetailsPage

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

the class ClientTest method checkPermissionToEditClientInPendingApprovalState.

@Test(enabled = true)
public void checkPermissionToEditClientInPendingApprovalState() {
    String firstName = "Edit";
    String lastName = "Permission";
    DefineHiddenMandatoryFieldsPage mandatoryFieldsPage = navigationHelper.navigateToAdminPage().navigateToDefineHiddenMandatoryFields();
    mandatoryFieldsPage.uncheckMandatoryCitizenShip();
    mandatoryFieldsPage.uncheckMandatoryEthnicity();
    mandatoryFieldsPage.uncheckMandatoryMaritalStatus();
    mandatoryFieldsPage.submit();
    CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = clientParams();
    clientParams.setFirstName(firstName);
    clientParams.setLastName(lastName);
    ClientViewDetailsPage clientPage = clientTestHelper.createNewClient("group1", clientParams);
    clientPage.editPersonalInformation().submitAndNavigateToViewDetailsPage(clientParams);
    CustomerChangeStatusPage changeStatusPage = clientPage.navigateToCustomerChangeStatusPage();
    EditCustomerStatusParameters parameters = new EditCustomerStatusParameters();
    parameters.setClientStatus(ClientStatus.PARTIAL);
    parameters.setNote("test");
    changeStatusPage.setChangeStatusParametersAndSubmit(parameters);
    ManageRolePage manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
    manageRolePage.disablePermission("3");
    manageRolePage.enablePermission("3_0_0");
    manageRolePage.enablePermission("3_0_2");
    manageRolePage.enablePermission("3_0_3");
    manageRolePage.submitAndGotoViewRolesPage();
    HomePage homePage = navigationHelper.navigateToHomePage();
    SearchResultsPage searchResultsPage = homePage.search(firstName + " " + lastName);
    ClientViewDetailsPage viewDetailsPage = searchResultsPage.navigateToClientViewDetailsPage("link=" + firstName + " " + lastName + "*");
    Assert.assertTrue(viewDetailsPage.editPersonalInformation().isAccessDeniedDisplayed());
    manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
    manageRolePage.enablePermission("3");
    manageRolePage.submitAndGotoViewRolesPage();
}
Also used : ClientSearchResultsPage(org.mifos.test.acceptance.framework.client.ClientSearchResultsPage) SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) ManageRolePage(org.mifos.test.acceptance.framework.admin.ManageRolePage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) HomePage(org.mifos.test.acceptance.framework.HomePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) DefineHiddenMandatoryFieldsPage(org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage) Test(org.testng.annotations.Test)

Aggregations

ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)47 Test (org.testng.annotations.Test)17 EditCustomerStatusParameters (org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)11 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)10 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)8 CustomerChangeStatusPreviewPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)6 QuestionnairePage (org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage)6 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)4 HomePage (org.mifos.test.acceptance.framework.HomePage)3 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)3 QuestionGroupResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionGroupResponsePage)3 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 DateTime (org.joda.time.DateTime)2 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)2 MifosPage (org.mifos.test.acceptance.framework.MifosPage)2 ClientViewChangeLogPage (org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage)2 CreateClientEnterFamilyDetailsPage (org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage)2 CreateClientEnterMfiDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)2