Search in sources :

Example 16 with GroupViewDetailsPage

use of org.mifos.test.acceptance.framework.group.GroupViewDetailsPage 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 17 with GroupViewDetailsPage

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

the class UpdateCustomPropertiesTest method verifyPropertyGroupPendingApprovalStateEnabled.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-211
@Test(enabled = true)
public void verifyPropertyGroupPendingApprovalStateEnabled() throws Exception {
    //Given
    propertiesHelper.setGroupPendingApprovalStateEnabled("false");
    //When
    GroupTestHelper groupTestHelper = new GroupTestHelper(selenium);
    CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
    groupParams.setGroupName("testGroup123123123123");
    GroupViewDetailsPage groupViewDetailsPage = groupTestHelper.createNewGroupWithoutPendingForApproval("Default Center", groupParams);
    //Then
    groupViewDetailsPage.verifyStatus("Active");
    propertiesHelper.setGroupPendingApprovalStateEnabled("true");
}
Also used : GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) Test(org.testng.annotations.Test)

Example 18 with GroupViewDetailsPage

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

the class ClientTest method createClientAssignedGroup.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createClientAssignedGroup() throws Exception {
    GroupViewDetailsPage groupViewDetailsPage = navigationHelper.navigateToGroupViewDetailsPage("GroupWeekly");
    String groupMeetingSchedule = groupViewDetailsPage.getMeetingSchedule();
    String groupMeetingPlace = groupViewDetailsPage.getMeetingPlace();
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateClientEnterPersonalDataPage createClientEnterPersonalDataPage = clientsAndAccountsHomepage.navigateToCreateNewClientPage().selectGroup("GroupWeekly");
    String clientMeetingSchedule = createClientEnterPersonalDataPage.getMeetingSchedule();
    String clientMeetingPlace = createClientEnterPersonalDataPage.getMeetingPlace();
    Assert.assertEquals(groupMeetingSchedule, clientMeetingSchedule);
    Assert.assertEquals(groupMeetingPlace, clientMeetingPlace);
    CreateClientEnterPersonalDataPage.SubmitFormParameters parameters = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
    parameters = clientParams();
    CreateClientPreviewDataPage createClientPreviewDataPage = createClientEnterPersonalDataPage.createWithoutSpouse(parameters).submitAndGotoCreateClientEnterMfiDataPage().navigateToPreview();
    String clientPreviewMeetingSchedule = createClientPreviewDataPage.getMeetingSchedule();
    String clientPreviewMeetingPlace = createClientPreviewDataPage.getMeetingPlace();
    Assert.assertEquals(groupMeetingSchedule, clientPreviewMeetingSchedule);
    Assert.assertEquals(groupMeetingPlace, clientPreviewMeetingPlace);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientPreviewDataPage(org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) SubmitFormParameters(org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters) Test(org.testng.annotations.Test)

Example 19 with GroupViewDetailsPage

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

the class QuestionResponsePage method navigateToCreateGroupDetailsPage.

public GroupViewDetailsPage navigateToCreateGroupDetailsPage(String status) {
    CreateGroupConfirmationPage confirmationPage = submitNewGroupForApproval();
    confirmationPage.verifyPage();
    GroupViewDetailsPage groupDetailsPage = confirmationPage.navigateToGroupDetailsPage();
    groupDetailsPage.verifyStatus(status);
    return groupDetailsPage;
}
Also used : GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) CreateGroupConfirmationPage(org.mifos.test.acceptance.framework.group.CreateGroupConfirmationPage)

Example 20 with GroupViewDetailsPage

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

the class ClientTestHelper method deleteClientGroupMembership.

public void deleteClientGroupMembership(String clientName, String note) {
    ClientViewDetailsPage clientViewDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
    String oldMeetingshedule = clientViewDetailsPage.getMeetingSchedule();
    String groupName = clientViewDetailsPage.getGroupMembership();
    GroupViewDetailsPage groupViewDetailsPage = navigationHelper.navigateToGroupViewDetailsPage(groupName);
    Integer activeClients = Integer.parseInt(groupViewDetailsPage.getNumberOfClientsInGroup());
    String avgIndyvidualLoanSize = groupViewDetailsPage.getAvgIndyvidualLoanSize();
    String totalLoanPortfolio = groupViewDetailsPage.getTotalLoanPortfolio();
    clientViewDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
    clientViewDetailsPage = clientViewDetailsPage.navigateToEditRemoveGroupMembership().deleteGroupMembership().confirmDeleteGroupMembership(note);
    clientViewDetailsPage.verifyMeetingSchedule(oldMeetingshedule);
    clientViewDetailsPage.verifyNotes(note);
    ClientViewChangeLogPage changeLogPage = clientViewDetailsPage.navigateToClientViewChangeLog();
    if ("groupFlag".equals(changeLogPage.getLastEntryFieldName())) {
        changeLogPage.verifyLastEntryOnChangeLog("groupFlag", "1", "0", "mifos");
        changeLogPage.verifyEntryOnChangeLog(2, "Group Name", groupName, "-", "mifos");
    } else {
        changeLogPage.verifyLastEntryOnChangeLog("Group Name", groupName, "-", "mifos");
        changeLogPage.verifyEntryOnChangeLog(2, "groupFlag", "1", "0", "mifos");
    }
    groupViewDetailsPage = navigationHelper.navigateToGroupViewDetailsPage(groupName);
    groupViewDetailsPage.verifyNumberOfClientsInGroup(Integer.toString(activeClients - 1));
    groupViewDetailsPage.verifyAvgIndyvidualLoanSize(avgIndyvidualLoanSize);
    groupViewDetailsPage.verifyTotalLoanPortfolio(totalLoanPortfolio);
}
Also used : GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) ClientViewChangeLogPage(org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage)

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