Search in sources :

Example 16 with ClientViewDetailsPage

use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.

the class ClientTest method createClientWithSaveForLaterAndChangeStatusTest.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-305
@Test(enabled = true)
public void createClientWithSaveForLaterAndChangeStatusTest() throws Exception {
    ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
    // When
    String groupName = "group1";
    CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
    clientParams = clientParams();
    ClientViewDetailsPage clientViewDetailsPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateNewClientPage().selectGroup(groupName).create(clientParams).submitAndGotoCreateClientEnterMfiDataPage().navigateToPreview().saveForLater().navigateToClientViewDetailsPage();
    clientViewDetailsPage.verifyStatus(ClientTestHelper.PARTIAL_APPLICATION);
    // Then
    clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.PENDING_APPROVAL);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) SubmitFormParameters(org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters) Test(org.testng.annotations.Test)

Example 17 with ClientViewDetailsPage

use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.

the class ClientTest method changeBackToPartialApplication.

private ClientViewDetailsPage changeBackToPartialApplication(int numberOfBlackFlags, ClientViewDetailsPage clientDetailsPage) {
    ClientViewDetailsPage newClientDetailsPage = changeClientStatusToPartialAndVerify(clientDetailsPage);
    newClientDetailsPage.verifyNumberOfBlackflags(numberOfBlackFlags);
    return clientDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 18 with ClientViewDetailsPage

use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.

the class ClientTest method verifyAcceptedPaymentTypes.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-248
@Test(enabled = true)
public void verifyAcceptedPaymentTypes() throws Exception {
    // When
    String groupName = "group1";
    CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
    clientParams = clientParams();
    clientParams.setFirstName("John");
    clientParams.setLastName("Doe123");
    ClientViewDetailsPage clientViewDetailsPage = clientTestHelper.createNewClient(groupName, clientParams);
    clientViewDetailsPage.verifyHeading("John Doe123");
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
    defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.CHEQUE);
    adminPage = navigationHelper.navigateToAdminPage();
    defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
    defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.VOUCHER);
    ApplyPaymentPage applyPaymentPage = navigationHelper.navigateToClientViewDetailsPage("John Doe123").navigateToViewClientChargesDetail().navigateToApplyPayments();
    // Then
    applyPaymentPage.verifyModeOfPayments();
}
Also used : ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) SubmitFormParameters(org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters) Test(org.testng.annotations.Test)

Example 19 with ClientViewDetailsPage

use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.

the class ClientTest method addingMemeberToGroupWithDiffrentStatuses.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//TODO http://mifosforge.jira.com/browse/MIFOS-5081
@Test(enabled = false)
public void addingMemeberToGroupWithDiffrentStatuses() throws Exception {
    String clientName;
    CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
    groupParams.setGroupName("testGroup" + StringUtil.getRandomString(5));
    EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
    editCustomerStatusParameters.setNote("change status");
    // When
    ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
    clientName = clientDetailsPage.getHeading();
    clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.ACTIVE);
    groupTestHelper.createNewGroupPartialApplication("Default Center", groupParams);
    // Then
    clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupParams.getGroupName());
    // When
    editCustomerStatusParameters.setGroupStatus(GroupStatus.PENDING_APPROVAL);
    groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
    // Then
    clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupParams.getGroupName());
    // When
    editCustomerStatusParameters.setGroupStatus(GroupStatus.ACTIVE);
    groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
    // Then
    clientTestHelper.addClientToGroup(clientName, groupParams.getGroupName());
    // When
    clientTestHelper.deleteClientGroupMembership(clientName, "remove group membership");
    editCustomerStatusParameters.setGroupStatus(GroupStatus.ON_HOLD);
    groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
    // Then
    clientTestHelper.tryAddClientToClosedOrOnHoldGroup(clientName, groupParams.getGroupName());
    // When
    editCustomerStatusParameters.setGroupStatus(GroupStatus.CLOSED);
    editCustomerStatusParameters.setCloseReason(GroupCloseReason.DUPLICATE);
    groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
    // Then
    clientTestHelper.tryAddClientToClosedOrOnHoldGroup(clientName, groupParams.getGroupName());
}
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)

Example 20 with ClientViewDetailsPage

use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.

the class QuestionGroupTest method editResponses.

private void editResponses(ClientViewDetailsPage clientViewDetailsPage, int id, Map<String, String> answers) {
    QuestionGroupResponsePage questionGroupResponsePage = clientViewDetailsPage.navigateToQuestionGroupResponsePage(id);
    QuestionnairePage questionnairePage = questionGroupResponsePage.navigateToEditResponses();
    for (String question : answers.keySet()) {
        questionnairePage.setResponse(question, answers.get(question));
    }
    ClientViewDetailsPage clientViewDetailsPage2 = (ClientViewDetailsPage) questionnairePage.submit();
    Assert.assertEquals(clientViewDetailsPage2.getQuestionGroupInstances().get(id).getName(), "TestQuestionGroup");
}
Also used : QuestionGroupResponsePage(org.mifos.test.acceptance.framework.questionnaire.QuestionGroupResponsePage) QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Aggregations

ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)47 Test (org.testng.annotations.Test)17 EditCustomerStatusParameters (org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)11 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)10 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)8 CustomerChangeStatusPreviewPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)6 QuestionnairePage (org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage)6 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)4 HomePage (org.mifos.test.acceptance.framework.HomePage)3 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)3 QuestionGroupResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionGroupResponsePage)3 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 DateTime (org.joda.time.DateTime)2 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)2 MifosPage (org.mifos.test.acceptance.framework.MifosPage)2 ClientViewChangeLogPage (org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage)2 CreateClientEnterFamilyDetailsPage (org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage)2 CreateClientEnterMfiDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)2