Search in sources :

Example 6 with QuestionnairePage

use of org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage in project head by mifos.

the class QuestionGroupTestHelper method verifyErrorsWhileAttachingQuestionGroupToClient.

public ClientViewDetailsPage verifyErrorsWhileAttachingQuestionGroupToClient(AttachQuestionGroupParameters attachParams) {
    QuestionnairePage questionnairePage = (QuestionnairePage) navigationHelper.navigateToClientViewDetailsPage(attachParams.getTarget()).navigateToAttachSurveyPage().selectSurvey(attachParams.getQuestionGroupName()).setResponses(attachParams.getTextResponses()).checkResponses(attachParams.getCheckResponses()).submitAndNavigateToClientViewDetailsPage();
    questionnairePage.verifyErrorsOnPage(attachParams.getErrors());
    return questionnairePage.cancel();
}
Also used : QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage)

Example 7 with QuestionnairePage

use of org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage in project head by mifos.

the class ClientTestHelper method editQuestionGroupResponses.

public ClientViewDetailsPage editQuestionGroupResponses(ClientViewDetailsPage clientViewDetailsPage, String numberSection, String locator, String response) {
    ViewQuestionResponseDetailPage viewQuestionResponseDetailPage = clientViewDetailsPage.navigateToViewAdditionalInformationPage();
    viewQuestionResponseDetailPage.verifyPage();
    QuestionnairePage questionnairePage = viewQuestionResponseDetailPage.navigateToEditSection(numberSection);
    questionnairePage.verifyPage();
    selenium.type(locator, response);
    ClientViewDetailsPage clientViewDetailsPage2 = (ClientViewDetailsPage) questionnairePage.submit();
    clientViewDetailsPage2.verifyPage("ViewClientDetails");
    return clientViewDetailsPage2;
}
Also used : ViewQuestionResponseDetailPage(org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage) QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 8 with QuestionnairePage

use of org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage in project head by mifos.

the class QuestionGroupTestHelper method attachQuestionGroup.

public ClientViewDetailsPage attachQuestionGroup(String clientName, String questionGroupTitle, List<String> sections, Map<String, String> answers) {
    AttachSurveyPage attachSurveyPage = navigationHelper.navigateToClientViewDetailsPage(clientName).navigateToAttachSurveyPage();
    QuestionnairePage questionnairePage = attachSurveyPage.selectSurvey(questionGroupTitle);
    for (String section : sections) {
        questionnairePage.verifyTextPresent(section, clientName);
    }
    for (String question : answers.keySet()) {
        questionnairePage.setResponse(question, answers.get(question));
    }
    return (ClientViewDetailsPage) questionnairePage.submit();
}
Also used : AttachSurveyPage(org.mifos.test.acceptance.framework.loan.AttachSurveyPage) QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 9 with QuestionnairePage

use of org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage in project head by mifos.

the class QuestionGroupTestHelper method verifyErrorsWhileAttachingQuestionGroupToGroup.

public GroupViewDetailsPage verifyErrorsWhileAttachingQuestionGroupToGroup(AttachQuestionGroupParameters attachParams) {
    QuestionnairePage questionnairePage = (QuestionnairePage) navigationHelper.navigateToGroupViewDetailsPage(attachParams.getTarget()).navigateToAttachSurveyPage().selectSurvey(attachParams.getQuestionGroupName()).setResponses(attachParams.getTextResponses()).checkResponses(attachParams.getCheckResponses()).submitAndNavigateToGroupViewDetailsPage();
    questionnairePage.verifyErrorsOnPage(attachParams.getErrors());
    return questionnairePage.cancelAndNavigateToGroupViewDetailsPage();
}
Also used : QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage)

Example 10 with QuestionnairePage

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

Aggregations

QuestionnairePage (org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage)19 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)6 ArrayList (java.util.ArrayList)4 QuestionResponseParameters (org.mifos.test.acceptance.framework.loan.QuestionResponseParameters)4 MifosPage (org.mifos.test.acceptance.framework.MifosPage)3 CreateQuestionGroupParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters)3 CreateQuestionParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionParameters)3 QuestionGroupResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionGroupResponsePage)3 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)3 ViewQuestionResponseDetailPage (org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage)3 Test (org.testng.annotations.Test)3 HashMap (java.util.HashMap)2 AttachSurveyPage (org.mifos.test.acceptance.framework.loan.AttachSurveyPage)2 SavingsAccountDetailPage (org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)2 List (java.util.List)1 DateTime (org.joda.time.DateTime)1 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 CenterViewDetailsPage (org.mifos.test.acceptance.framework.center.CenterViewDetailsPage)1 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)1 CreateGroupSubmitParameters (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters)1