Search in sources :

Example 6 with CustomerChangeStatusPage

use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage 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 7 with CustomerChangeStatusPage

use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage 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 8 with CustomerChangeStatusPage

use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage in project head by mifos.

the class ClientTestHelper method changeCustomerStatus.

public ClientViewDetailsPage changeCustomerStatus(ClientViewDetailsPage clientDetailsPage) {
    CustomerChangeStatusPage statusChangePage = clientDetailsPage.navigateToCustomerChangeStatusPage();
    EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
    editCustomerStatusParameters.setClientStatus(ClientStatus.PARTIAL);
    editCustomerStatusParameters.setNote("Status change");
    CustomerChangeStatusPreviewPage statusPreviewPage = statusChangePage.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
    ClientViewDetailsPage clientDetailsPage2 = statusPreviewPage.submitAndGotoClientViewDetailsPage();
    clientDetailsPage2.verifyStatus(PARTIAL_APPLICATION);
    clientDetailsPage2.verifyNotes(editCustomerStatusParameters.getNote());
    CustomerChangeStatusPage statusChangePage2 = clientDetailsPage2.navigateToCustomerChangeStatusPage();
    editCustomerStatusParameters.setClientStatus(ClientStatus.PENDING_APPROVAL);
    editCustomerStatusParameters.setNote("notes");
    CustomerChangeStatusPreviewPage statusPreviewPage2 = statusChangePage2.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
    ClientViewDetailsPage clientDetailsPage3 = statusPreviewPage2.submitAndGotoClientViewDetailsPage();
    clientDetailsPage3.verifyNotes(editCustomerStatusParameters.getNote());
    clientDetailsPage2.verifyStatus(PENDING_APPROVAL);
    CustomerChangeStatusPage statusChangePage3 = clientDetailsPage3.navigateToCustomerChangeStatusPage();
    editCustomerStatusParameters.setClientStatus(ClientStatus.ACTIVE);
    editCustomerStatusParameters.setNote("notes");
    CustomerChangeStatusPreviewPage statusPreviewPage3 = statusChangePage3.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
    ClientViewDetailsPage clientDetailsPage4 = statusPreviewPage3.submitAndGotoClientViewDetailsPage();
    clientDetailsPage4.verifyNotes(editCustomerStatusParameters.getNote());
    clientDetailsPage3.verifyStatus(ACTIVE);
    CustomerChangeStatusPage statusChangePage4 = clientDetailsPage4.navigateToCustomerChangeStatusPage();
    ClientViewDetailsPage clientDetailsPage5 = statusChangePage4.cancelAndGotoClientViewDetailsPage();
    clientDetailsPage5.verifyNotes(editCustomerStatusParameters.getNote());
    return clientDetailsPage5;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) CustomerChangeStatusPreviewPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)

Example 9 with CustomerChangeStatusPage

use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage in project head by mifos.

the class ClientTestHelper method changeCustomerStatus.

public ClientViewDetailsPage changeCustomerStatus(ClientViewDetailsPage clientDetailsPage, ClientStatus targetStatus) {
    CustomerChangeStatusPage statusChangePage = clientDetailsPage.navigateToCustomerChangeStatusPage();
    EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
    editCustomerStatusParameters.setClientStatus(targetStatus);
    editCustomerStatusParameters.setNote("Status change");
    CustomerChangeStatusPreviewPage statusPreviewPage = statusChangePage.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
    ClientViewDetailsPage newClientDetailsPage = statusPreviewPage.submitAndGotoClientViewDetailsPage();
    newClientDetailsPage.verifyStatus(targetStatus.getStatusText());
    newClientDetailsPage.verifyNotes(editCustomerStatusParameters.getNote());
    return newClientDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) CustomerChangeStatusPreviewPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)

Example 10 with CustomerChangeStatusPage

use of org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage in project head by mifos.

the class QuestionGroupTest method attachingQuestionGroupToMultipleFlowsTest.

/**
     * Attaching a Question Group to Multiple flows
     * http://mifosforge.jira.com/browse/MIFOSTEST-701
     *
     * @throws Exception
     */
@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void attachingQuestionGroupToMultipleFlowsTest() throws Exception {
    String newClient = "Joe701 Doe701";
    questionGroupTestHelper.markQuestionGroupAsInactive("CreateOffice");
    createClient("Joe701", "Doe701");
    //When
    testValidationAddQuestionGroup();
    Map<String, List<String>> sectionQuestions = new HashMap<String, List<String>>();
    List<String> questions = new ArrayList<String>();
    questions.add("Date");
    questions.add("Number");
    questions.add("Text");
    sectionQuestions.put("Sec Test", questions);
    CreateQuestionGroupParameters createQuestionGroupParameters = new CreateQuestionGroupParameters();
    createQuestionGroupParameters.setAnswerEditable(true);
    String testQuestionGroup = "TestQuestionGroup";
    createQuestionGroupParameters.setTitle(testQuestionGroup);
    createQuestionGroupParameters.setAppliesTo("View Client");
    createQuestionGroupParameters.setAppliesTo("Close Client");
    createQuestionGroupParameters.setExistingQuestions(sectionQuestions);
    try {
        questionGroupTestHelper.createQuestionGroup(createQuestionGroupParameters);
        Map<String, String> answers = new HashMap<String, String>();
        answers.put("Text", "Test - Text");
        answers.put("Number", "2");
        answers.put("Date", "11/11/2009");
        ClientViewDetailsPage clientViewDetailsPage = questionGroupTestHelper.attachQuestionGroup(newClient, testQuestionGroup, asList("Sec Test"), answers);
        CustomerChangeStatusPage customerChangeStatusPage = clientViewDetailsPage.navigateToCustomerChangeStatusPage();
        EditCustomerStatusParameters customerStatusParameters = new EditCustomerStatusParameters();
        customerStatusParameters.setNote("TEST");
        customerStatusParameters.setClientStatus(ClientStatus.CLOSED);
        customerStatusParameters.setClientCloseReason(ClientCloseReason.TRANSFERRED);
        QuestionResponsePage questionResponsePage = customerChangeStatusPage.changeStatusAndNavigateToQuestionResponsePage(customerStatusParameters);
        //Then
        questionResponsePage.verifyQuestionsExists(questions.toArray(new String[questions.size()]));
        //When
        clientViewDetailsPage = questionResponsePage.cancel();
        ViewQuestionResponseDetailPage viewQuestionResponseDetailPage = clientViewDetailsPage.navigateToViewAdditionalInformationPage();
        //Then
        viewQuestionResponseDetailPage.verifyQuestionsDoesnotappear(questions.toArray(new String[questions.size()]));
        clientViewDetailsPage = viewQuestionResponseDetailPage.navigateToClientViewDetailsPage();
        answers = new HashMap<String, String>();
        answers.put("Text", "Test - Text - Edit");
        answers.put("Number", "22");
        questionGroupInstancesOfClient = clientViewDetailsPage.getQuestionGroupInstances();
        questionGroupTestHelper.editResponses(clientViewDetailsPage, latestInstanceId(questionGroupInstancesOfClient), answers);
        // extension MIFOS-5821
        CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
        searchParameters.setSearchString("Client - Mary Monthly");
        searchParameters.setLoanProduct("MonthlyClientFlatLoanThirdFridayOfMonth");
        loanTestHelper.createDefaultLoanAccount(searchParameters);
    } finally {
        questionGroupTestHelper.markQuestionGroupAsInactive(testQuestionGroup);
        questionGroupTestHelper.markQuestionGroupAsInactive("CreateOffice");
    }
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ViewQuestionResponseDetailPage(org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage) CreateQuestionGroupParameters(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters) HashMap(java.util.HashMap) QuestionResponsePage(org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage) ArrayList(java.util.ArrayList) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) List(java.util.List) ArrayList(java.util.ArrayList) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) Test(org.testng.annotations.Test)

Aggregations

CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)10 EditCustomerStatusParameters (org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)9 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)8 CustomerChangeStatusPreviewPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)7 Test (org.testng.annotations.Test)5 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 CreateGroupSubmitParameters (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters)2 GroupViewDetailsPage (org.mifos.test.acceptance.framework.group.GroupViewDetailsPage)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