use of org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage in project head by mifos.
the class QuestionGroupTest method createOfficeWithQuestionGroup.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void createOfficeWithQuestionGroup() throws Exception {
//When
QuestionResponsePage questionResponsePage = officeHelper.navigateToQuestionResponsePage(getOfficeParameters("MyOfficeDHMFT", "DHM"));
QuestionResponseParameters initialResponse = getResponse("123");
QuestionResponseParameters updatedResponse = getResponse("1234");
CreateOfficePreviewDataPage createOfficePreviewDataPage = questionGroupTestHelper.createOfficeWithQuestionGroup(questionResponsePage, initialResponse, updatedResponse);
assertTextFoundOnPage("This office name already exist");
DefineNewOfficePage defineNewOfficePage = createOfficePreviewDataPage.editOfficeInformation();
defineNewOfficePage.setOfficeName("TestOffice");
defineNewOfficePage.setOfficeShortName("TO");
defineNewOfficePage.preview();
defineNewOfficePage.next();
OfficeViewDetailsPage officeViewDetailsPage = createOfficePreviewDataPage.submit().navigateToOfficeViewDetailsPage();
ViewQuestionResponseDetailPage viewQuestionResponseDetailPage = officeViewDetailsPage.navigateToViewAdditionalInformation();
viewQuestionResponseDetailPage.verifyQuestionPresent("FreeText", "1234");
officeViewDetailsPage = viewQuestionResponseDetailPage.navigateToDetailsPage();
String newQuestion = "Text";
addQuestion(newQuestion, "Default", CREATE_OFFICE_QUESTION_GROUP_ID);
String questionToDeactivate = "FreeText";
questionGroupTestHelper.markQuestionAsInactive(questionToDeactivate);
questionResponsePage = officeHelper.navigateToQuestionResponsePage(getOfficeParameters("TestOffice2", "TO2"));
//Then
questionResponsePage.verifyQuestionsDoesnotappear(new String[] { questionToDeactivate });
questionResponsePage.verifyQuestionsExists(new String[] { newQuestion });
officeHelper.verifyQuestionPresent("TestOffice", "Text", "");
}
Aggregations