Search in sources :

Example 6 with GroupViewDetailsPage

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);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) ViewQuestionResponseDetailPage(org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage) Choice(org.mifos.test.acceptance.framework.questionnaire.Choice) CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) QuestionResponsePage(org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) CreateGroupEntryPage(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage) Test(org.testng.annotations.Test)

Example 7 with GroupViewDetailsPage

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;
}
Also used : GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage)

Example 8 with GroupViewDetailsPage

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;
}
Also used : GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage)

Example 9 with GroupViewDetailsPage

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);
}
Also used : CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) Test(org.testng.annotations.Test)

Example 10 with GroupViewDetailsPage

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);
    }
}
Also used : CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) CancelReason(org.mifos.test.acceptance.framework.group.CancelReason) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) Test(org.testng.annotations.Test)

Aggregations

GroupViewDetailsPage (org.mifos.test.acceptance.framework.group.GroupViewDetailsPage)20 Test (org.testng.annotations.Test)10 CreateGroupSubmitParameters (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters)9 CreateGroupConfirmationPage (org.mifos.test.acceptance.framework.group.CreateGroupConfirmationPage)4 CreateGroupEntryPage (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage)4 EditCustomerStatusParameters (org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)4 HomePage (org.mifos.test.acceptance.framework.HomePage)2 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)2 CustomerChangeStatusPreviewPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)2 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)2 ViewQuestionResponseDetailPage (org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage)2 SearchResultsPage (org.mifos.test.acceptance.framework.search.SearchResultsPage)2 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)2 ArrayList (java.util.ArrayList)1 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)1 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)1 ClientViewChangeLogPage (org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage)1 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)1 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)1 CreateClientPreviewDataPage (org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage)1