use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage in project head by mifos.
the class ClientTestHelper method navigateToQuestionResponsePageWhenCloseClientAccount.
public QuestionResponsePage navigateToQuestionResponsePageWhenCloseClientAccount(String clientName) {
EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
editCustomerStatusParameters.setClientStatus(ClientStatus.CLOSED);
editCustomerStatusParameters.setClientCloseReason(ClientCloseReason.LEFT_PROGRAM);
editCustomerStatusParameters.setNote("Close client account");
ClientViewDetailsPage clientDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
CustomerChangeStatusPage statusChangePage = clientDetailsPage.navigateToCustomerChangeStatusPage();
return statusChangePage.changeStatusAndNavigateToQuestionResponsePage(editCustomerStatusParameters);
}
use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage in project head by mifos.
the class ClientTestHelper method closeClientWithQG.
public ClientViewDetailsPage closeClientWithQG(String clientName, QuestionResponseParameters responseParamsAfterModyfication) {
EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
editCustomerStatusParameters.setClientStatus(ClientStatus.CLOSED);
editCustomerStatusParameters.setClientCloseReason(ClientCloseReason.LEFT_PROGRAM);
editCustomerStatusParameters.setNote("Close client account");
ClientViewDetailsPage clientDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
CustomerChangeStatusPage statusChangePage = clientDetailsPage.navigateToCustomerChangeStatusPage();
QuestionResponsePage questionResponsePage = statusChangePage.changeStatusAndNavigateToQuestionResponsePage(editCustomerStatusParameters);
questionResponsePage.populateAnswers(responseParamsAfterModyfication);
questionResponsePage.navigateToNextPage();
new CustomerChangeStatusPreviewPage(selenium).submitAndGotoClientViewDetailsPage();
return new ClientViewDetailsPage(selenium);
}
use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage 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.customer.CustomerChangeStatusPage 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();
}
use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage in project head by mifos.
the class ClientTest method searchClientAndEditExistingClientDetails.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-310
@Test(enabled = true)
public void searchClientAndEditExistingClientDetails() throws Exception {
HomePage homePage = navigationHelper.navigateToHomePage();
homePage = searchForClient("client1 lastname", homePage, 1);
homePage = searchForClient("zzz", homePage, 0);
SearchResultsPage searchResultsPage = homePage.search("client1 lastname");
searchResultsPage.verifyPage();
int numResults = searchResultsPage.countSearchResults();
Assert.assertEquals(numResults, 1);
ClientViewDetailsPage viewDetailsPage = searchResultsPage.navigateToClientViewDetailsPage("link=client1 lastname*");
ClientNotesPage notesPage = viewDetailsPage.navigateToNotesPage();
notesPage.addNotePreviewAndSubmit("test note");
viewDetailsPage.verifyNotes("test note");
CustomerChangeStatusPage changeStatusPage = viewDetailsPage.navigateToCustomerChangeStatusPage();
EditCustomerStatusParameters parameters = new EditCustomerStatusParameters();
parameters.setClientStatus(ClientStatus.ON_HOLD);
parameters.setNote("test");
CustomerChangeStatusPreviewPage changeStatusPreviewPage = changeStatusPage.setChangeStatusParametersAndSubmit(parameters);
viewDetailsPage = changeStatusPreviewPage.submitAndGotoClientViewDetailsPage();
viewDetailsPage.verifyStatus("On Hold");
ClientEditPersonalInfoPage editPersonalInfoPage = viewDetailsPage.editPersonalInformation();
CreateClientEnterPersonalDataPage.SubmitFormParameters parameters2 = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
parameters2.setSpouseFirstName("FatherFirstnameTest");
parameters2.setSpouseLastName("FatherLastNameTest");
parameters2.setSpouseNameType(CreateClientEnterPersonalDataPage.SubmitFormParameters.FATHER);
parameters2.setDateOfBirthYYYY("1960");
parameters2.setDateOfBirthMM("08");
parameters2.setDateOfBirthDD("01");
viewDetailsPage = editPersonalInfoPage.submitAndNavigateToViewDetailsPage(parameters2);
viewDetailsPage.verifySpouseFather("FatherFirstnameTest FatherLastNameTest");
ClientNotesPage seeAllNotes = viewDetailsPage.navigateToAllNotesPage();
seeAllNotes.verifySeeAllNotesTitle("client1 lastname");
// extension to verify MIFOS-5685
applicationDatabaseOperation.updateGLIM(1);
applicationDatabaseOperation.updateLSIM(1);
seeAllNotes.navigateBack();
editPersonalInfoPage = viewDetailsPage.editPersonalInformation();
parameters2.setDateOfBirthYYYY("1961");
parameters2.setDateOfBirthMM("07");
parameters2.setDateOfBirthDD("02");
viewDetailsPage = editPersonalInfoPage.submitAndNavigateToViewDetailsPage(parameters2);
viewDetailsPage.verifyDateOfBirth("02", "07", "1961");
seeAllNotes = viewDetailsPage.navigateToAllNotesPage();
seeAllNotes.verifySeeAllNotesTitle("client1 lastname");
applicationDatabaseOperation.updateGLIM(0);
applicationDatabaseOperation.updateLSIM(0);
}
Aggregations