use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage 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.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method verifyClientCreatedWithActiveStatus.
/**
* Verify when Pending Approval (Clients) is set to false; the system transitions the account to 'Active state' when
* creating new clients http://mifosforge.jira.com/browse/MIFOSTEST-209
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void verifyClientCreatedWithActiveStatus() throws Exception {
applicationDatabaseOperation.updateCustomerState("2", "0");
propertiesHelper.setClientPendingApprovalStateEnabled("false");
String officeName = "MyOfficeDHMFT";
String loanOfficer = "loan officer";
ClientViewDetailsPage clientViewDetailsPage = clientTestHelper.createClientAndVerify(loanOfficer, officeName);
clientViewDetailsPage.verifyStatus("Active");
// restore original settings
applicationDatabaseOperation.updateCustomerState("2", "1");
propertiesHelper.setClientPendingApprovalStateEnabled("true");
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method createClientAndChangeStatusTest.
@Test(singleThreaded = true, groups = { "smoke", "client", "acceptance", "ui", "no_db_unit" }, enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-208
void createClientAndChangeStatusTest() throws Exception {
ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
// When / Then
clientTestHelper.changeCustomerStatus(clientDetailsPage);
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method addClientWithSavingToGroupWithSavingsCheckGroupCalculation.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//blocked by http://mifosforge.jira.com/browse/MIFOS-4272 - ldomzalski
@Test(enabled = false)
public void addClientWithSavingToGroupWithSavingsCheckGroupCalculation() throws Exception {
String groupName = "group1";
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("240.0");
EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
editAccountStatusParameters.setNote("change status to active");
// When
ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.ACTIVE);
String clientName = clientDetailsPage.getHeading();
searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
searchParameters.setSearchString(clientName);
String savingsId = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters).getAccountId();
savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
SavingsProductParameters savingsProductParameters = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(2009, 7, 13, 12, 0, 0, 0), SavingsProductParameters.MANDATORY, SavingsProductParameters.GROUPS);
savingsProductParameters.setShortName("M-45");
savingsProductParameters.setAmountAppliesTo(SavingsProductParameters.PER_INDIVIDUAL);
savingsProductHelper.createSavingsProduct(savingsProductParameters);
searchParameters.setSavingsProduct(savingsProductParameters.getProductInstanceName());
searchParameters.setSearchString(groupName);
savingsId = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters).getAccountId();
savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
clientTestHelper.addClientToGroup(clientName, groupName);
// Then
Integer numberOfGroupMembers = Integer.parseInt(navigationHelper.navigateToGroupViewDetailsPage(groupName).getNumberOfClientsInGroup());
savingsAccountHelper.verifyTotalAmountDue(savingsId, numberOfGroupMembers, Float.parseFloat(submitAccountParameters.getAmount()));
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class LoanTestHelper method verifyPerformenceHistory.
public void verifyPerformenceHistory(String clientName, PerformanceHistoryAtributes performanceHistoryAtributes) {
ClientViewDetailsPage clientViewDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
clientViewDetailsPage.verifyPerformanceHistory(performanceHistoryAtributes);
}
Aggregations