@@ -80,3 +80,44 @@ Feature: Review responses
80
80
And I press "Delete"
81
81
Then I should see "You are not eligible to take this questionnaire."
82
82
And I should not see "View all responses"
83
+
84
+ @javascript
85
+ Scenario : Choices with HTML should display filtered HTML in the responses on the response page
86
+ Given the following "users" exist:
87
+ | username | firstname | lastname | email |
88
+ | teacher1 | Teacher | 1 | teacher1 @example .com |
89
+ | student1 | Student | 1 | student1 @example .com |
90
+ And the following "courses" exist:
91
+ | fullname | shortname | category |
92
+ | Course 1 | C1 | 0 |
93
+ And the following "course enrolments" exist:
94
+ | user | course | role |
95
+ | teacher1 | C1 | editingteacher |
96
+ | student1 | C1 | student |
97
+ And the following "activities" exist:
98
+ | activity | name | description | course | idnumber |
99
+ | questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 |
100
+ And I log in as "teacher1"
101
+ And I am on "Course 1" course homepage
102
+ And I follow "Test questionnaire"
103
+ And I navigate to "Questions" in current page administration
104
+ And I add a "Check Boxes" question and I fill the form with:
105
+ | Question Name | Q1 |
106
+ | Yes | y |
107
+ | Min . forced responses | 1 |
108
+ | Max . forced responses | 2 |
109
+ | Question Text | Select one or two choices only |
110
+ | Possible answers | <b >One </b >,Two ,Three ,Four |
111
+ And I log in as "student1"
112
+ And I am on "Course 1" course homepage
113
+ And I follow "Test questionnaire"
114
+ And I navigate to "Answer the questions..." in current page administration
115
+ Then I should see "Select one or two choices only"
116
+ # And I set the field "Do you own a car?" to "y"
117
+ And I set the field "One" to "checked"
118
+ And I press "Submit questionnaire"
119
+ And I log in as "teacher1"
120
+ And I am on "Course 1" course homepage
121
+ And I follow "Test questionnaire"
122
+ And I navigate to "View all responses" in current page administration
123
+ Then "//b[text()='One']" "xpath_element" should exist
0 commit comments