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();
}
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;
}
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();
}
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();
}
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;
}
Aggregations