use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage 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.CustomerChangeStatusPreviewPage 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.CustomerChangeStatusPreviewPage 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);
}
use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage in project head by mifos.
the class ClientTest method closeClientAccountWithQG.
// http://mifosforge.jira.com/browse/MIFOSTEST-663
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void closeClientAccountWithQG() throws Exception {
//Given
String groupName = "group1";
CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = clientParams();
clientParams.setFirstName("John");
clientParams.setLastName("Doe4321");
ClientViewDetailsPage clientPage = clientTestHelper.createNewClient(groupName, clientParams);
String clientName = clientPage.getGlobalCustNum();
clientTestHelper.changeCustomerStatus(clientPage, ClientStatus.ACTIVE);
createQuestions2();
createQuestionGroup2();
String qG_1 = "CloseClientQG";
String qG_2 = "CloseClientQG2";
QuestionResponseParameters responseParams = getQuestionResponseParametersForClientAccountClose("answer1");
QuestionResponseParameters responseParams2 = getQuestionResponseParametersForClientAccountClose("answer2");
QuestionResponseParameters responseParamsAfterModyfication = getQuestionResponseParametersForClientAccountCloseAfterModyfication("answer2");
List<CreateQuestionParameters> questionsList = new ArrayList<CreateQuestionParameters>();
questionsList.add(newFreeTextQuestionParameters("663new question 1"));
questionsList.add(newFreeTextQuestionParameters("663new question 2"));
questionsList.add(newFreeTextQuestionParameters("663new question 3"));
String[] newActiveQuestions = { "663new question 1", "663new question 2" };
String[] deactivateArray = { "663new question 3", question3, question6, question2, question5 };
String[] deactivatedGroupArray = { question10, question11 };
List<String> deactivateList = Arrays.asList(deactivateArray);
Map<String, String> questionsAndAnswers = new HashMap<String, String>();
questionsAndAnswers.put("663new question 1", "answer2");
questionsAndAnswers.put("663new question 2", "answer2");
questionsAndAnswers.put(question1, "24/01/2011");
questionsAndAnswers.put(question4, "10");
questionsAndAnswers.put(question7, "24/01/2011");
questionsAndAnswers.put(question8, "jan");
questionsAndAnswers.put(question9, "answer2");
//When / Then
QuestionResponsePage responsePage = clientTestHelper.navigateToQuestionResponsePageWhenCloseClientAccount(clientName);
responsePage.populateAnswers(responseParams);
responsePage.navigateToNextPage();
responsePage = new CustomerChangeStatusPreviewPage(selenium).navigateToEditAdditionalInformation();
responsePage.populateAnswers(responseParams2);
responsePage.navigateToNextPage();
new CustomerChangeStatusPreviewPage(selenium).cancelAndGotoClientViewDetailsPage();
QuestionGroupTestHelper questionTestHelper = new QuestionGroupTestHelper(selenium);
questionTestHelper.addNewQuestionsToQuestionGroup(qG_1, questionsList);
questionTestHelper.markQuestionsAsInactive(deactivateList);
questionTestHelper.markQuestionGroupAsInactive(qG_2);
responsePage = clientTestHelper.navigateToQuestionResponsePageWhenCloseClientAccount(clientName);
responsePage.verifyQuestionsDoesnotappear(deactivateArray);
responsePage.verifyQuestionsDoesnotappear(deactivatedGroupArray);
responsePage.verifyQuestionsExists(newActiveQuestions);
clientTestHelper.closeClientWithQG(clientName, responseParamsAfterModyfication);
verifyQuestionResponsesExistInDatabase(clientName, "Close Client", questionsAndAnswers);
questionTestHelper.markQuestionsAsInactive(asList("663new question 1", "663new question 2", question1, question2, question4, question7, question8, question9, question10, question11));
questionTestHelper.markQuestionGroupAsInactive(qG_1);
}
use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage in project head by mifos.
the class GroupTest method createGroupInPendingApprovalStateTest.
@Test(singleThreaded = true, groups = { "group", "acceptance", "ui", "no_db_unit" })
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-301
void createGroupInPendingApprovalStateTest() throws Exception {
//When
CreateGroupEntryPage groupEntryPage = loginAndNavigateToNewGroupPage();
CreateGroupSubmitParameters formParameters = getGenericGroupFormParameters();
CreateGroupConfirmationPage confirmationPage = groupEntryPage.submitNewGroupForApproval(formParameters);
confirmationPage.verifyPage();
GroupViewDetailsPage groupDetailsPage = confirmationPage.navigateToGroupDetailsPage();
//Then
groupDetailsPage.verifyStatus("Application Pending*");
//When
CustomerChangeStatusPage customerChangeStatusPage = groupDetailsPage.navigateToEditGroupStatusPage();
EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
editCustomerStatusParameters.setGroupStatus(GroupStatus.ACTIVE);
editCustomerStatusParameters.setNote("test");
CustomerChangeStatusPreviewPage customerChangeStatusPreviewPage = customerChangeStatusPage.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
GroupViewDetailsPage detailsPage = customerChangeStatusPreviewPage.navigateToGroupDetailsPage();
//Then
detailsPage.verifyStatus("Active*");
}
Aggregations