Search in sources :

Example 11 with EditCustomerStatusParameters

use of org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters 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)

Example 12 with EditCustomerStatusParameters

use of org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters 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*");
}
Also used : CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) CreateGroupEntryPage(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) CreateGroupConfirmationPage(org.mifos.test.acceptance.framework.group.CreateGroupConfirmationPage) CustomerChangeStatusPreviewPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage) Test(org.testng.annotations.Test)

Example 13 with EditCustomerStatusParameters

use of org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters in project head by mifos.

the class GroupTest method createGroupInPartialApplicationStateTest.

@Test(singleThreaded = true, groups = { "group", "acceptance", "ui", "no_db_unit" })
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void createGroupInPartialApplicationStateTest() throws Exception {
    //When
    CreateGroupEntryPage groupEntryPage = loginAndNavigateToNewGroupPage();
    CreateGroupSubmitParameters formParameters = getGenericGroupFormParameters();
    CreateGroupConfirmationPage confirmationPage = groupEntryPage.submitNewGroupForPartialApplication(formParameters);
    confirmationPage.verifyPage();
    GroupViewDetailsPage groupDetailsPage = confirmationPage.navigateToGroupDetailsPage();
    //Then
    groupDetailsPage.verifyStatus("Partial Application*");
    //When
    CustomerChangeStatusPage customerChangeStatusPage = groupDetailsPage.navigateToEditGroupStatusPage();
    EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
    editCustomerStatusParameters.setGroupStatus(GroupStatus.PENDING_APPROVAL);
    editCustomerStatusParameters.setNote("test");
    CustomerChangeStatusPreviewPage customerChangeStatusPreviewPage = customerChangeStatusPage.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
    GroupViewDetailsPage detailsPage = customerChangeStatusPreviewPage.navigateToGroupDetailsPage();
    //Then
    detailsPage.verifyStatus("Application Pending Approval*");
}
Also used : CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) CreateGroupEntryPage(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) CreateGroupConfirmationPage(org.mifos.test.acceptance.framework.group.CreateGroupConfirmationPage) CustomerChangeStatusPreviewPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage) Test(org.testng.annotations.Test)

Example 14 with EditCustomerStatusParameters

use of org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters in project head by mifos.

the class GroupTest method verifyChangeCenterMembership.

/**
     * Create group and change center membership for group
     * http://mifosforge.jira.com/browse/MIFOSTEST-655
     *
     * @throws Exception
     */
@Test(groups = { "group", "acceptance", "ui", "no_db_unit" })
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyChangeCenterMembership() throws Exception {
    String centerName = "Default Center";
    String newCenterName = "WeeklyMeetingCenter";
    String groupName = "Group655";
    CreateGroupSubmitParameters groupParams = getGenericGroupFormParameters();
    groupParams.setGroupName(groupName);
    EditCustomerStatusParameters groupStatusParams = new EditCustomerStatusParameters();
    groupStatusParams.setNote("note");
    GroupViewDetailsPage groupViewDetailsPage = groupTestHelper.createNewGroupPartialApplication(centerName, groupParams);
    groupViewDetailsPage.verifyStatus(GroupViewDetailsPage.STATUS_PARTIAL_APPLICATION);
    groupStatusParams.setGroupStatus(GroupStatus.PENDING_APPROVAL);
    groupTestHelper.changeGroupStatus(groupName, groupStatusParams);
    groupStatusParams.setGroupStatus(GroupStatus.ACTIVE);
    groupViewDetailsPage = groupTestHelper.changeGroupStatus(groupName, groupStatusParams);
    groupViewDetailsPage.verifyStatus(GroupViewDetailsPage.STATUS_ACTIVE);
    groupViewDetailsPage = groupTestHelper.changeGroupCenterMembership(groupName, newCenterName);
    groupViewDetailsPage.navigateToGroupsCenter(newCenterName);
}
Also used : CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) Test(org.testng.annotations.Test)

Example 15 with EditCustomerStatusParameters

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

Aggregations

EditCustomerStatusParameters (org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)20 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)11 Test (org.testng.annotations.Test)10 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)9 CreateGroupSubmitParameters (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters)7 CustomerChangeStatusPreviewPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)6 GroupViewDetailsPage (org.mifos.test.acceptance.framework.group.GroupViewDetailsPage)4 HomePage (org.mifos.test.acceptance.framework.HomePage)2 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)2 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)2 CreateGroupConfirmationPage (org.mifos.test.acceptance.framework.group.CreateGroupConfirmationPage)2 CreateGroupEntryPage (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage)2 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)2 SearchResultsPage (org.mifos.test.acceptance.framework.search.SearchResultsPage)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 DefineHiddenMandatoryFieldsPage (org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage)1 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)1 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)1