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