1 |
efrain |
1 |
@mod @mod_questionnaire
|
|
|
2 |
Feature: Slider questions can add slider with range for users to choose
|
|
|
3 |
In order to setup a slider question
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to specify the range.
|
|
|
6 |
|
|
|
7 |
Background: Add a slider question to a questionnaire.
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category |
|
|
|
14 |
| Course 1 | C1 | 0 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activities" exist:
|
|
|
20 |
| activity | name | description | course | idnumber |
|
|
|
21 |
| questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 |
|
|
|
22 |
And I log in as "teacher1"
|
|
|
23 |
And I am on "Course 1" course homepage
|
|
|
24 |
And I am on the "Test questionnaire" "questionnaire activity" page
|
|
|
25 |
And I navigate to "Questions" in current page administration
|
|
|
26 |
And I add a "Slider" question and I fill the form with:
|
|
|
27 |
| Question Name | Q1 |
|
|
|
28 |
| Question Text | Slider quesrion test |
|
|
|
29 |
| Left label | Left |
|
|
|
30 |
| Right label | Right |
|
|
|
31 |
| Centre label | Center |
|
|
|
32 |
| Minimum slider range (left) | 5 |
|
|
|
33 |
| Maximum slider range (right) | 100 |
|
|
|
34 |
| Slider starting value | 5 |
|
|
|
35 |
| Slider increment value | 5 |
|
|
|
36 |
Then I should see "position 1"
|
|
|
37 |
And I should see " [Slider] (Q1)"
|
|
|
38 |
And I should see "Slider quesrion test"
|
|
|
39 |
And I log out
|
|
|
40 |
|
|
|
41 |
@javascript
|
|
|
42 |
Scenario: Student use slider questionnaire.
|
|
|
43 |
And I log in as "student1"
|
|
|
44 |
And I am on "Course 1" course homepage
|
|
|
45 |
And I am on the "Test questionnaire" "questionnaire activity" page
|
|
|
46 |
And I navigate to "Answer the questions..." in current page administration
|
|
|
47 |
Then I should see "Slider quesrion test"
|
|
|
48 |
And I should see "Left"
|
|
|
49 |
And I should see "Right"
|
|
|
50 |
And I should see "Center"
|
|
|
51 |
And I press "Submit questionnaire"
|
|
|
52 |
Then I should see "Thank you for completing this Questionnaire."
|
|
|
53 |
And I press "Continue"
|
|
|
54 |
Then I should see "View your response(s)"
|
|
|
55 |
|
|
|
56 |
@javascript
|
|
|
57 |
Scenario: Teacher use slider questionnaire with invalid setting.
|
|
|
58 |
Given I log in as "teacher1"
|
|
|
59 |
And I am on "Course 1" course homepage
|
|
|
60 |
And I am on the "Test questionnaire" "questionnaire activity" page
|
|
|
61 |
And I navigate to "Questions" in current page administration
|
|
|
62 |
And I add a "Slider" question and I fill the form with:
|
|
|
63 |
| Question Name | Q1 |
|
|
|
64 |
| Question Text | Slider quesrion test |
|
|
|
65 |
| Left label | Left |
|
|
|
66 |
| Right label | Right |
|
|
|
67 |
| Centre label | Center |
|
|
|
68 |
| Minimum slider range (left) | 10 |
|
|
|
69 |
| Maximum slider range (right) | 5 |
|
|
|
70 |
| Slider starting value | 10 |
|
|
|
71 |
| Slider increment value | 15 |
|
|
|
72 |
And I should see "The maximum slider value must be greater than the minimum slider value."
|
|
|
73 |
And I should see "Note that the value increments must be lower than the maximum value. For example, if a scale of 1-10, the increment value would probably be 1."
|
|
|
74 |
And I am on "Course 1" course homepage
|
|
|
75 |
And I am on the "Test questionnaire" "questionnaire activity" page
|
|
|
76 |
And I navigate to "Questions" in current page administration
|
|
|
77 |
And I add a "Slider" question and I fill the form with:
|
|
|
78 |
| Question Name | Q1 |
|
|
|
79 |
| Question Text | Slider quesrion test |
|
|
|
80 |
| Left label | Left |
|
|
|
81 |
| Right label | Right |
|
|
|
82 |
| Centre label | Center |
|
|
|
83 |
| Minimum slider range (left) | -999 |
|
|
|
84 |
| Maximum slider range (right) | 999 |
|
|
|
85 |
| Slider starting value | 10 |
|
|
|
86 |
| Slider increment value | 15 |
|
|
|
87 |
And I should see "This question type supports an absolute maximum range of -100 to +100. We expect the vast majority of questionnaire designs to use a range of 1-10 or -10 to +10."
|