1441 |
ariadna |
1 |
@mod @mod_feedback
|
|
|
2 |
Feature: Managing feedback questions
|
|
|
3 |
In order to manage feedback questions
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to create, edit and delete feedback questions
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname |
|
|
|
10 |
| teacher | Teacher | 1 |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname |
|
|
|
13 |
| Course 1 | C1 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | course | idnumber |
|
|
|
19 |
| feedback | Learning experience course 1 | C1 | feedback1 |
|
|
|
20 |
And the following "mod_feedback > question" exists:
|
|
|
21 |
| activity | feedback1 |
|
|
|
22 |
| name | Is it me you're looking for? |
|
|
|
23 |
| label | q1 |
|
|
|
24 |
|
|
|
25 |
Scenario: Teacher can create a new feedback question
|
|
|
26 |
Given I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
|
|
|
27 |
And I click on "Edit questions" "link" in the "region-main" "region"
|
|
|
28 |
When I add a "Short text answer" question to the feedback with:
|
|
|
29 |
| Question | I can see it in your eyes |
|
|
|
30 |
| Label | q2 |
|
|
|
31 |
Then I should see "(q2) I can see it in your eyes"
|
|
|
32 |
|
|
|
33 |
@javascript
|
|
|
34 |
Scenario: Teacher can edit feedback questions
|
|
|
35 |
Given I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
|
|
|
36 |
And I click on "Edit questions" "link" in the "region-main" "region"
|
|
|
37 |
When I click on "Edit" "link" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
38 |
And I choose "Edit question" in the open action menu
|
|
|
39 |
And I set the field "Question" to "Can you see it in my eyes?"
|
|
|
40 |
And I press "Save changes to question"
|
|
|
41 |
Then I should see "(q1) Can you see it in my eyes?"
|
|
|
42 |
And I should not see "(q1) Is it me you're looking for?"
|
|
|
43 |
|
|
|
44 |
@javascript
|
|
|
45 |
Scenario: Teacher can edit and save as new feedback questions
|
|
|
46 |
Given I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
|
|
|
47 |
And I click on "Edit questions" "link" in the "region-main" "region"
|
|
|
48 |
When I click on "Edit" "link" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
49 |
And I choose "Edit question" in the open action menu
|
|
|
50 |
And I set the field "Question" to "You can se it in my eyes?"
|
|
|
51 |
And I press "Save as new question"
|
|
|
52 |
Then I should see "(q1) Is it me you're looking for?"
|
|
|
53 |
And I should see "(q1) You can se it in my eyes?"
|
|
|
54 |
|
|
|
55 |
@javascript
|
|
|
56 |
Scenario: Teacher can delete feedback questions
|
|
|
57 |
Given I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
|
|
|
58 |
And I click on "Edit questions" "link" in the "region-main" "region"
|
|
|
59 |
When I click on "Edit" "link" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
60 |
And I choose "Delete question" in the open action menu
|
|
|
61 |
And I click on "Yes" "button" in the "Confirmation" "dialogue"
|
|
|
62 |
Then I should not see "(q1) Is it me you're looking for?"
|
|
|
63 |
|
|
|
64 |
@javascript
|
|
|
65 |
Scenario: Teacher can mark as required feedback questions
|
|
|
66 |
Given I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
|
|
|
67 |
And I click on "Edit questions" "link" in the "region-main" "region"
|
|
|
68 |
When I click on "Edit" "link" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
69 |
And I choose "Set as required" in the open action menu
|
|
|
70 |
And I click on "Edit" "link" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
71 |
And I choose "Edit question" in the open action menu
|
|
|
72 |
Then the field "Required" matches value "1"
|
|
|
73 |
And I press "Cancel"
|
|
|
74 |
And I click on "Edit" "link" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
75 |
And I choose "Set as not required" in the open action menu
|
|
|
76 |
And I click on "Edit" "link" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
77 |
And I choose "Edit question" in the open action menu
|
|
|
78 |
And the field "Required" matches value "0"
|
|
|
79 |
|
|
|
80 |
@javascript
|
|
|
81 |
Scenario: Teacher can move questions
|
|
|
82 |
Given the following "mod_feedback > questions" exist:
|
|
|
83 |
| activity | label | name |
|
|
|
84 |
| feedback1 | q2 | I can see it in your eyes |
|
|
|
85 |
| feedback1 | q3 | I can see it in your smile |
|
|
|
86 |
And I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
|
|
|
87 |
And I click on "Edit questions" "link" in the "region-main" "region"
|
|
|
88 |
When I click on "Move this question" "button" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
89 |
Then I should see "After \"(q2) I can see it in your eyes\"" in the "Move this question" "dialogue"
|
|
|
90 |
And I should not see "To the top of the list" in the "Move this question" "dialogue"
|
|
|
91 |
And I click on "After \"(q3) I can see it in your smile\"" "link" in the "Move this question" "dialogue"
|
|
|
92 |
And I click on "Move this question" "button" in the "Is it me you're looking for?" "mod_feedback > Question"
|
|
|
93 |
And I click on "To the top of the list" "link" in the "Move this question" "dialogue"
|