|
| 1 | +@mod @mod_questionnaire |
| 2 | +Feature: In questionnaire, slider questions can be defined with scores attributed to specific answers, in order |
| 3 | + to provide score dependent feedback. |
| 4 | + In order to define a feedback question |
| 5 | + As a teacher |
| 6 | + I must add a required slider question type. |
| 7 | + |
| 8 | + @javascript |
| 9 | + Scenario: Create a questionnaire with a slider question type and verify that feedback options exist. |
| 10 | + Given the following "users" exist: |
| 11 | + | username | firstname | lastname | email | |
| 12 | + | teacher1 | Teacher | 1 | teacher1@example.com | |
| 13 | + | student1 | Student | 1 | student1@example.com | |
| 14 | + And the following "courses" exist: |
| 15 | + | fullname | shortname | category | |
| 16 | + | Course 1 | C1 | 0 | |
| 17 | + And the following "course enrolments" exist: |
| 18 | + | user | course | role | |
| 19 | + | teacher1 | C1 | editingteacher | |
| 20 | + | student1 | C1 | student | |
| 21 | + And the following "activities" exist: |
| 22 | + | activity | name | description | course | idnumber | resume | navigate | |
| 23 | + | questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 | 1 | 1 | |
| 24 | + And I log in as "teacher1" |
| 25 | + And I am on "Course 1" course homepage |
| 26 | + And I follow "Test questionnaire" |
| 27 | + And I follow "Feedback" |
| 28 | + Then I should not see "Display Scores" |
| 29 | + And I navigate to "Questions" in current page administration |
| 30 | + Then I should see "Add questions" |
| 31 | + And I add a "Slider" question and I fill the form with: |
| 32 | + | Question Name | Q1 | |
| 33 | + | Question Text | Slider question test 1 | |
| 34 | + | Left label | Left | |
| 35 | + | Right label | Right | |
| 36 | + | Centre label | Center | |
| 37 | + | Minimum slider range (left) | -5 | |
| 38 | + | Maximum slider range (right) | 5 | |
| 39 | + | Slider starting value | 0 | |
| 40 | + | Slider increment value | 1 | |
| 41 | + Then I should see " [Slider] (Q1)" |
| 42 | + And I should see "Slider question test" |
| 43 | + And I follow "Feedback" |
| 44 | + Then I should not see "Display Scores" |
| 45 | + And I navigate to "Questions" in current page administration |
| 46 | + Then I should see "Add questions" |
| 47 | + And I add a "Slider" question and I fill the form with: |
| 48 | + | Question Name | Q2 | |
| 49 | + | Question Text | Slider question test 2 | |
| 50 | + | Left label | Left | |
| 51 | + | Right label | Right | |
| 52 | + | Centre label | Center | |
| 53 | + | Minimum slider range (left) | 0 | |
| 54 | + | Maximum slider range (right) | 5 | |
| 55 | + | Slider starting value | 0 | |
| 56 | + | Slider increment value | 1 | |
| 57 | + Then I should see " [Slider] (Q2)" |
| 58 | + And I add a "Slider" question and I fill the form with: |
| 59 | + | Question Name | Q3 | |
| 60 | + | Question Text | Slider question test 3 | |
| 61 | + | Left label | Left | |
| 62 | + | Right label | Right | |
| 63 | + | Centre label | Center | |
| 64 | + | Minimum slider range (left) | 0 | |
| 65 | + | Maximum slider range (right) | 2 | |
| 66 | + | Slider starting value | 0 | |
| 67 | + | Slider increment value | 1 | |
| 68 | + Then I should see " [Slider] (Q3)" |
| 69 | + And I should see "Slider question test" |
| 70 | + And I follow "Feedback" |
| 71 | + And I should see "Feedback options" |
| 72 | + And I should see "Display Scores" |
| 73 | + And I set the field "id_feedbacksections" to "Feedback sections" |
| 74 | + And I set the field "id_feedbackscores" to "Yes" |
| 75 | + And I set the field "id_feedbacknotes" to "These are the main Feedback notes" |
| 76 | + And I press "Save settings and edit Feedback Sections" |
| 77 | + Then I should see "[New section] section questions" |
| 78 | + And I follow "[New section] section questions" |
| 79 | + Then I should see "Add question to section" |
| 80 | + And I should not see "Q1" |
| 81 | + And I should see "Q2" |
| 82 | + And I log out |
0 commit comments