use of org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters in project head by mifos.
the class ClientTest method prepareGroupsForAddClientsWithAccountsToGroups.
private void prepareGroupsForAddClientsWithAccountsToGroups(String groupInactiveAccountName, String groupActiveAccountName, Map<String, GroupViewDetailsPage> groups, String savingsProductNameForGroups) {
String center = "Default Center";
groups.put(groupInactiveAccountName, null);
groups.put(groupActiveAccountName, null);
CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
EditCustomerStatusParameters customerStatusParameters = new EditCustomerStatusParameters();
customerStatusParameters.setNote("MIFOS-4272: activate groups");
for (String groupKey : groups.keySet()) {
groupParams.setGroupName(groupKey);
groupTestHelper.createNewGroupPartialApplication(center, groupParams);
customerStatusParameters.setGroupStatus(GroupStatus.PENDING_APPROVAL);
groupTestHelper.changeGroupStatus(groupKey, customerStatusParameters);
customerStatusParameters.setGroupStatus(GroupStatus.ACTIVE);
groups.put(groupKey, groupTestHelper.changeGroupStatus(groupKey, customerStatusParameters));
}
addSavingsToCustomer(groupInactiveAccountName, false, savingsProductNameForGroups);
addSavingsToCustomer(groupActiveAccountName, true, savingsProductNameForGroups);
}
use of org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters in project head by mifos.
the class ClientTest method addingMemeberToGroupWithDiffrentStatuses.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//TODO http://mifosforge.jira.com/browse/MIFOS-5081
@Test(enabled = false)
public void addingMemeberToGroupWithDiffrentStatuses() throws Exception {
String clientName;
CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
groupParams.setGroupName("testGroup" + StringUtil.getRandomString(5));
EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
editCustomerStatusParameters.setNote("change status");
// When
ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
clientName = clientDetailsPage.getHeading();
clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.ACTIVE);
groupTestHelper.createNewGroupPartialApplication("Default Center", groupParams);
// Then
clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupParams.getGroupName());
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.PENDING_APPROVAL);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupParams.getGroupName());
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.ACTIVE);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.addClientToGroup(clientName, groupParams.getGroupName());
// When
clientTestHelper.deleteClientGroupMembership(clientName, "remove group membership");
editCustomerStatusParameters.setGroupStatus(GroupStatus.ON_HOLD);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.tryAddClientToClosedOrOnHoldGroup(clientName, groupParams.getGroupName());
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.CLOSED);
editCustomerStatusParameters.setCloseReason(GroupCloseReason.DUPLICATE);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.tryAddClientToClosedOrOnHoldGroup(clientName, groupParams.getGroupName());
}
use of org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters in project head by mifos.
the class GroupTest method getGenericGroupFormParameters.
private CreateGroupSubmitParameters getGenericGroupFormParameters() {
CreateGroupSubmitParameters formParameters = new CreateGroupSubmitParameters();
formParameters.setGroupName("groupTest" + StringUtil.getRandomString(6));
formParameters.setRecruitedBy("Bagonza Wilson");
formParameters.setTrainedDateDay("25");
formParameters.setTrainedDateMonth("03");
formParameters.setTrainedDateYear("1999");
formParameters.setExternalId("external12345");
formParameters.setAddressOne("address one: 4321 Pine Street");
formParameters.setAddressTwo("address two: P.O. Box 99");
formParameters.setAddressThree("address three: suite 322");
formParameters.setCity("Circuit City");
formParameters.setState("Garden State");
formParameters.setCountry("Elbonia");
formParameters.setPostalCode("33AB3");
formParameters.setTelephone("88855533322");
return formParameters;
}
use of org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters in project head by mifos.
the class GroupTest method createGroupInPendingApprovalStateTestWithSurveys.
@Test(singleThreaded = true, groups = { "smoke", "group", "acceptance", "ui", "no_db_unit" })
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void createGroupInPendingApprovalStateTestWithSurveys() throws Exception {
QuestionGroupTestHelper questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
String questionGroupTitle = "QG1" + random.nextInt(100);
String question1 = "Nu_" + random.nextInt(100);
String question2 = "SS_" + random.nextInt(100);
List<Choice> choices = asList(new Choice("Choice1", asList("Tag1", "Tag2")), new Choice("Choice2", asList("Tag3", "Tag4")));
createQuestionGroupForCreateGroup(questionGroupTitle, question1, question2, choices);
CreateGroupEntryPage groupEntryPage = loginAndNavigateToNewGroupPage();
CreateGroupSubmitParameters formParameters = getGenericGroupFormParameters();
QuestionResponsePage questionResponsePage = groupEntryPage.submitNewGroupAndNavigateToQuestionResponsePage(formParameters);
questionResponsePage.verifyPage();
questionResponsePage.verifyNumericBoundsValidation("name=questionGroups[0].sectionDetails[0].questions[0].value", "1000", 10, 100, question1);
questionResponsePage.populateTextAnswer("name=questionGroups[0].sectionDetails[0].questions[0].value", "30");
questionResponsePage.populateSmartSelect("txtListSearch", getChoiceTags());
GroupViewDetailsPage groupViewDetailsPage = questionResponsePage.navigateToCreateGroupDetailsPage("Application Pending*");
ViewQuestionResponseDetailPage responsePage = groupViewDetailsPage.navigateToViewAdditionalInformationPage();
responsePage.verifyPage();
responsePage.verifyQuestionPresent(question1, "30");
responsePage.verifyQuestionPresent(question2, "Choice", "Choice2");
responsePage.navigateToDetailsPage();
questionGroupTestHelper.markQuestionGroupAsInactive(questionGroupTitle);
}
use of org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters in project head by mifos.
the class ClientTest method addingMemeberOnHoldStatusToGroupWithDiffrentStatuses.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//TODO http://mifosforge.jira.com/browse/MIFOS-5081
@Test(enabled = false)
public void addingMemeberOnHoldStatusToGroupWithDiffrentStatuses() throws Exception {
String groupName = "testGroup";
String clientName = "test";
CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
groupParams.setGroupName(groupName);
EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
editCustomerStatusParameters.setNote("change status");
// When
ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.ACTIVE);
clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.ON_HOLD);
groupTestHelper.createNewGroupPartialApplication("Default Center", groupParams);
// Then
clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupName);
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.PENDING_APPROVAL);
groupTestHelper.changeGroupStatus(groupName, editCustomerStatusParameters);
// Then
clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupName);
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.ACTIVE);
groupTestHelper.changeGroupStatus(groupName, editCustomerStatusParameters);
// Then
clientTestHelper.addClientToGroup(clientName, groupName);
}
Aggregations