use of org.mifos.test.acceptance.framework.group.GroupViewDetailsPage 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.GroupViewDetailsPage in project head by mifos.
the class GroupTest method changeGroupStatusToCancelledAndVerifyFlag.
private GroupViewDetailsPage changeGroupStatusToCancelledAndVerifyFlag(String fullGroupName, EditCustomerStatusParameters statusParameters) {
GroupViewDetailsPage detailsPage;
int expectedNumberOfFlags = 1;
detailsPage = changeGroupStatusToCancelled(fullGroupName, statusParameters);
detailsPage.verifyStatus(statusParameters);
detailsPage.verifyNumberOfBlackFlags(expectedNumberOfFlags);
return detailsPage;
}
use of org.mifos.test.acceptance.framework.group.GroupViewDetailsPage in project head by mifos.
the class GroupTest method changeGroupStatusToCancelled.
private GroupViewDetailsPage changeGroupStatusToCancelled(String fullGroupName, EditCustomerStatusParameters statusParameters) {
GroupViewDetailsPage detailsPage;
detailsPage = groupTestHelper.changeGroupStatus(fullGroupName, statusParameters);
return detailsPage;
}
use of org.mifos.test.acceptance.framework.group.GroupViewDetailsPage in project head by mifos.
the class GroupTest method verifyPendingApprovalSetToDefault.
/**
* Verify when Pending Approval (Groups) is set to default(true);
* the system transitions the account to this state when creating new groups
* http://mifosforge.jira.com/browse/MIFOSTEST-210
*
* @throws Exception
*/
@Test(groups = { "group", "acceptance", "ui", "no_db_unit" })
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyPendingApprovalSetToDefault() throws Exception {
CreateGroupSubmitParameters groupParams = getGenericGroupFormParameters();
String centerName = "WeeklyMeetingCenter";
GroupViewDetailsPage groupViewDetailsPage = groupTestHelper.createNewGroup(centerName, groupParams);
groupViewDetailsPage.verifyStatus(GroupViewDetailsPage.STATUS_PENDING_APPROVAL);
}
use of org.mifos.test.acceptance.framework.group.GroupViewDetailsPage in project head by mifos.
the class GroupTest method changeGroupStatusAndVerifyBlacklistedFlag.
//http://mifosforge.jira.com/browse/MIFOS-4643
/**
* Creates new group, tests status changes and verifies blacklisted flag.
* @see http://mifosforge.jira.com/browse/MIFOS-4643
*/
@Test(enabled = true, groups = { "group", "acceptance", "ui", "no_db_unit" })
public void changeGroupStatusAndVerifyBlacklistedFlag() {
String groupStatusNote = "GROUP TEST FOR GROUP";
String center = "Default Center";
String fullGroupName = "testGroup" + StringUtil.getRandomString(8);
//create test group
CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
groupParams.setGroupName(fullGroupName);
GroupViewDetailsPage detailsPage = groupTestHelper.createNewGroupPartialApplication(center, groupParams);
//verify with starting status
EditCustomerStatusParameters statusParameters = new EditCustomerStatusParameters();
statusParameters.setGroupStatus(GroupStatus.PARTIAL);
//note will be set only once
statusParameters.setNote(groupStatusNote + fullGroupName);
detailsPage.verifyStatus(statusParameters);
//change status to Cancelled with reason Rejected and check
changeStatusParameters(statusParameters, GroupStatus.CANCELLED, CancelReason.GROUP_REJECTED);
detailsPage = changeGroupStatusToCancelled(fullGroupName, statusParameters);
detailsPage.verifyStatus(statusParameters);
//change status back to Partial Application and verify
detailsPage = changeGroupStatusBackToPartial(fullGroupName, statusParameters);
detailsPage.verifyStatus(statusParameters);
//change status to Cancelled with Reason blacklisted
changeStatusParameters(statusParameters, GroupStatus.CANCELLED, CancelReason.GROUP_BLACKLISTED);
detailsPage = changeGroupStatusToCancelledAndVerifyFlag(fullGroupName, statusParameters);
//sequence of setting group status to partial, verifying blackflag, changing status to cancelled and verifying again
CancelReason[] reasonArray = { CancelReason.GROUP_DUPLICATE, CancelReason.GROUP_OTHER, CancelReason.GROUP_REJECTED, CancelReason.GROUP_WITHDRAW, CancelReason.GROUP_BLACKLISTED };
for (CancelReason cancelReason : reasonArray) {
detailsPage = changeGroupStatusToPartialAndVerifyFlag(fullGroupName, statusParameters);
changeStatusParameters(statusParameters, GroupStatus.CANCELLED, cancelReason);
changeGroupStatusToCancelledAndVerifyFlag(fullGroupName, statusParameters);
}
}
Aggregations