Search in sources :

Example 36 with ClientViewDetailsPage

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

the class ClientTest method testAttachQuestionGroup.

private void testAttachQuestionGroup(String response) {
    QuestionnairePage questionnairePage = viewClientDetailsPage.getQuestionnairePage(questionGroupTitle);
    verifyCancel(questionnairePage);
    questionnairePage = checkMandatoryQuestionValidation(questionGroupTitle, question1, question2, viewClientDetailsPage);
    questionnairePage.setResponse(question1, response);
    MifosPage mifosPage = questionnairePage.submit();
    Assert.assertTrue(mifosPage instanceof ClientViewDetailsPage);
    ClientViewDetailsPage clientViewDetailsPage = (ClientViewDetailsPage) mifosPage;
    viewClientDetailsPage = clientViewDetailsPage;
}
Also used : QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) MifosPage(org.mifos.test.acceptance.framework.MifosPage)

Example 37 with ClientViewDetailsPage

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

the class ClientTest method testEditQuestionGroup.

private void testEditQuestionGroup(String answer) {
    int instanceId = latestInstanceId(questionGroupInstancesOfClient);
    QuestionGroupResponsePage questionGroupResponsePage = viewClientDetailsPage.navigateToQuestionGroupResponsePage(instanceId);
    QuestionnairePage questionnairePage = questionGroupResponsePage.navigateToEditResponses();
    verifyCancel(questionnairePage);
    questionGroupResponsePage = viewClientDetailsPage.navigateToQuestionGroupResponsePage(instanceId);
    questionnairePage = questionGroupResponsePage.navigateToEditResponses();
    questionnairePage.setResponse(question1, answer);
    MifosPage mifosPage = questionnairePage.submit();
    Assert.assertTrue(mifosPage instanceof ClientViewDetailsPage);
    ClientViewDetailsPage clientViewDetailsPage = (ClientViewDetailsPage) mifosPage;
    viewClientDetailsPage = clientViewDetailsPage;
}
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) MifosPage(org.mifos.test.acceptance.framework.MifosPage)

Example 38 with ClientViewDetailsPage

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

the class ClientTestHelper method navigateToClientViewDetailsPage.

public ClientViewDetailsPage navigateToClientViewDetailsPage(String clientName) {
    ClientViewDetailsPage clientViewDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
    clientViewDetailsPage.verifyPage("ViewClientDetails");
    return clientViewDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 39 with ClientViewDetailsPage

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

the class ClientTestHelper method navigateToClientViewDetails.

private ClientViewDetailsPage navigateToClientViewDetails(CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters) {
    ClientViewDetailsPage clientViewDetailsPage = new CreateClientConfirmationPage(selenium).navigateToClientViewDetailsPage();
    clientViewDetailsPage.verifyName(formParameters.getFirstName() + " " + formParameters.getLastName());
    clientViewDetailsPage.verifyDateOfBirth(formParameters.getDateOfBirthDD(), formParameters.getDateOfBirthMM(), formParameters.getDateOfBirthYYYY());
    clientViewDetailsPage.verifySpouseFather(formParameters.getSpouseFirstName() + " " + formParameters.getSpouseLastName());
    clientViewDetailsPage.verifyHandicapped(formParameters.getHandicapped());
    return clientViewDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) CreateClientConfirmationPage(org.mifos.test.acceptance.framework.client.CreateClientConfirmationPage)

Example 40 with ClientViewDetailsPage

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

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