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);
}
}
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*");
}
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*");
}
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);
}
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);
}
Aggregations