Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 24... Línea 24...
24
      | activity   | name                         | course | idnumber    |
24
      | activity   | name                         | course | idnumber    |
25
      | feedback   | Learning experience course 1 | C1     | feedback1   |
25
      | feedback   | Learning experience course 1 | C1     | feedback1   |
26
      | feedback   | Another feedback in course 1 | C1     | feedback2   |
26
      | feedback   | Another feedback in course 1 | C1     | feedback2   |
27
      | feedback   | Learning experience course 2 | C2     | feedback3   |
27
      | feedback   | Learning experience course 2 | C2     | feedback3   |
28
    And I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
28
    And I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
29
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
29
    And I navigate to "Questions" in current page administration
30
    And I add a "Multiple choice" question to the feedback with:
30
    And I add a "Multiple choice" question to the feedback with:
31
      | Question         | this is a multiple choice 1 |
31
      | Question         | this is a multiple choice 1 |
32
      | Label            | multichoice1                |
32
      | Label            | multichoice1                |
33
      | Multiple choice type | Multiple choice - single answer |
33
      | Multiple choice type | Multiple choice - single answer |
34
      | Multiple choice values | option a\noption b\noption c  |
34
      | Multiple choice values | option a\noption b\noption c  |
Línea 36... Línea 36...
36
 
36
 
37
  @javascript
37
  @javascript
38
  Scenario: Teacher can save template and re-use it in the same course only
38
  Scenario: Teacher can save template and re-use it in the same course only
39
    # Go to feedback templates and make sure none exist yet
39
    # Go to feedback templates and make sure none exist yet
40
    When I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
-
 
41
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
40
    When I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
42
    And I select "Use a template" from the "jump" singleselect
41
    And I navigate to "Templates" in current page administration
43
    Then I should see "No templates available yet"
-
 
44
    And "Use a template" "field" should not exist
-
 
45
    And "Public" "field" should not exist
-
 
46
    And I select "Add question" from the "jump" singleselect
42
    Then I should see "No templates available yet"
-
 
43
    # Save as a course template
-
 
44
    And I navigate to "Feedback" in current page administration
47
    # Save as a course template
45
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
-
 
46
    And I press "Actions"
48
    And I press "Save as new template"
47
    And I choose "Save as template" in the open action menu
49
    And I should see "Save as new template" in the ".modal-title" "css_element"
48
    And I should see "Save as template" in the ".modal-title" "css_element"
50
    And I should see "Name" in the ".modal-body" "css_element"
49
    And I should see "Name" in the ".modal-body" "css_element"
51
    And I set the field "Name" to "My first template"
50
    And I set the field "Name" to "My first template"
52
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
51
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
53
    And I should see "Template saved"
52
    And I should see "Template saved"
54
    And I select "Use a template" from the "jump" singleselect
53
    And I navigate to "Templates" in current page administration
55
    And I should see "My first template"
54
    And I should see "My first template"
56
    # Create a feedback from this template in the same course
55
    # Create a feedback from this template in the same course
57
    And I am on the "Another feedback in course 1" "feedback activity" page
-
 
58
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
56
    And I am on the "Another feedback in course 1" "feedback activity" page
59
    And I select "Use a template" from the "jump" singleselect
57
    And I navigate to "Templates" in current page administration
60
    And I follow "My first template"
-
 
61
    And I should see "this is a multiple choice 1"
58
    And I open the action menu in "My first template" "table_row"
62
    And I press "Use this template"
59
    And I choose "Use template" in the open action menu
63
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
60
    And I click on "Save" "button" in the "Use template" "dialogue"
64
    And I should see "this is a multiple choice 1"
61
    And I should see "this is a multiple choice 1"
65
    # Make sure this template is not available in another course
62
    # Make sure this template is not available in another course
66
    And I am on the "Learning experience course 2" "feedback activity" page
-
 
67
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
63
    And I am on the "Learning experience course 2" "feedback activity" page
68
    And I select "Use a template" from the "jump" singleselect
64
    And I navigate to "Templates" in current page administration
-
 
65
    And I should see "No templates available yet"
-
 
66
    # Make sure Template cannot be created without questions
-
 
67
    And I am on the "Learning experience course 2" "feedback activity" page
69
    And I should see "No templates available yet"
68
    And I navigate to "Questions" in current page administration
-
 
69
    And I press "Actions"
Línea 70... Línea 70...
70
    And I log out
70
    And I should not see "Save as template"
71
 
71
 
72
  @javascript
72
  @javascript
73
  Scenario: Teacher can append template to existing questions or remove them
73
  Scenario: Teacher can append template to existing questions or remove them
74
    # Save feedback as a course template
74
    # Save feedback as a course template
75
    When I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
75
    When I am on the "Learning experience course 1" "feedback activity" page logged in as teacher
-
 
76
    And I navigate to "Questions" in current page administration
76
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
77
    And I press "Actions"
77
    And I press "Save as new template"
78
    And I choose "Save as template" in the open action menu
78
    And I should see "Save as new template" in the ".modal-title" "css_element"
79
    And I should see "Save as template" in the ".modal-title" "css_element"
79
    And I should see "Name" in the ".modal-body" "css_element"
80
    And I should see "Name" in the ".modal-body" "css_element"
80
    And I set the field "Name" to "My first template"
81
    And I set the field "Name" to "My first template"
-
 
82
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
81
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
83
    And I press "Actions"
82
    And I press "Save as new template"
84
    And I choose "Save as template" in the open action menu
83
    # Add questions to another feedback
85
    # Add questions to another feedback
84
    And I am on the "Another feedback in course 1" "feedback activity" page
86
    And I am on the "Another feedback in course 1" "feedback activity" page
85
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
87
    And I navigate to "Questions" in current page administration
86
    And I add a "Multiple choice" question to the feedback with:
88
    And I add a "Multiple choice" question to the feedback with:
87
      | Question         | What is your favourite subject |
89
      | Question         | What is your favourite subject |
88
      | Label            | subjectchoice                  |
90
      | Label            | subjectchoice                  |
89
      | Multiple choice type | Multiple choice - single answer   |
91
      | Multiple choice type | Multiple choice - single answer   |
90
      | Multiple choice values | Maths\bScience\nEnglish\nOther  |
92
      | Multiple choice values | Maths\bScience\nEnglish\nOther  |
91
    # Import template appending items
93
    # Import template appending items
92
    And I select "Use a template" from the "jump" singleselect
94
    And I navigate to "Templates" in current page administration
93
    And I follow "My first template"
95
    And I open the action menu in "My first template" "table_row"
94
    And I press "Use this template"
96
    And I choose "Use template" in the open action menu
95
    And I set the field "Append new items" to "1"
97
    And I set the field "Keep existing questions and add new questions at the end" to "1"
96
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
98
    And I click on "Save" "button" in the "Use template" "dialogue"
97
    Then "What is your favourite subject" "text" should appear before "this is a multiple choice 1" "text"
99
    Then "What is your favourite subject" "text" should appear before "this is a multiple choice 1" "text"
98
    # Import template replacing items
100
    # Import template replacing items (through Preview page)
-
 
101
    And I navigate to "Templates" in current page administration
99
    And I select "Use a template" from the "jump" singleselect
102
    And I open the action menu in "My first template" "table_row"
-
 
103
    And I choose "Preview" in the open action menu
100
    And I follow "My first template"
104
    And I press "Actions"
101
    And I press "Use this template"
105
    And I choose "Use template" in the open action menu
102
    And I set the field "Delete old items" to "1"
106
    And I set the field "Override existing questions" to "1"
103
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
107
    And I click on "Save" "button" in the "Use template" "dialogue"
104
    And I should see "this is a multiple choice 1"
108
    And I should see "this is a multiple choice 1"
Línea 105... Línea 109...
105
    And I should not see "What is your favourite subject"
109
    And I should not see "What is your favourite subject"
106
    And I should see "this is a multiple choice 1"
110
    And I should see "this is a multiple choice 1"
107
 
111
 
108
  @javascript
112
  @javascript
109
  Scenario: Manager can save template as public and it will be available in any course
113
  Scenario: Manager can save template as public and it will be available in any course
-
 
114
    When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
110
    When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
115
    And I navigate to "Questions" in current page administration
111
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
116
    And I press "Actions"
112
    And I press "Save as new template"
117
    And I choose "Save as template" in the open action menu
113
    And I set the field "Name" to "My first template"
118
    And I set the field "Name" to "My first template"
114
    And I set the field "Public" to "1"
119
    And I set the field "Available for all courses" to "1"
115
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
-
 
116
    And I log out
120
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
117
    And I am on the "Learning experience course 2" "feedback activity" page logged in as teacher
121
    And I log out
118
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
-
 
119
    And I select "Use a template" from the "jump" singleselect
122
    And I am on the "Learning experience course 2" "feedback activity" page logged in as teacher
120
    And I follow "My first template"
123
    And I navigate to "Templates" in current page administration
121
    And I should see "this is a multiple choice 1"
124
    And I open the action menu in "My first template" "table_row"
122
    And I press "Use this template"
125
    And I choose "Use template" in the open action menu
123
    And I set the field "Delete old items" to "1"
-
 
Línea 124... Línea 126...
124
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
126
    And I set the field "Override existing questions" to "1"
125
    Then I should see "this is a multiple choice 1"
127
    And I click on "Save" "button" in the "Use template" "dialogue"
126
    And I log out
128
    Then I should see "this is a multiple choice 1"
127
 
129
 
128
  @javascript
130
  @javascript
129
  Scenario: Teacher can delete course templates but can not delete public templates
131
  Scenario: Teacher can delete course templates but can not delete public templates
-
 
132
    # Save feedback as both public and course template
130
    # Save feedback as both public and course template
133
    When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
131
    When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
134
    And I navigate to "Questions" in current page administration
132
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
135
    And I press "Actions"
133
    And I press "Save as new template"
136
    And I choose "Save as template" in the open action menu
-
 
137
    And I set the field "Name" to "My public template"
134
    And I set the field "Name" to "My public template"
138
    And I set the field "Available for all courses" to "1"
135
    And I set the field "Public" to "1"
139
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
136
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
140
    And I press "Actions"
137
    And I press "Save as new template"
141
    And I choose "Save as template" in the open action menu
138
    And I set the field "Name" to "My course template"
142
    And I set the field "Name" to "My course template"
139
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
-
 
140
    And I log out
143
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
141
    # Login as teacher and try to delete templates
144
    And I log out
142
    And I am on the "Another feedback in course 1" "feedback activity" page logged in as teacher
145
    # Login as teacher and try to delete templates
-
 
146
    And I am on the "Another feedback in course 1" "feedback activity" page logged in as teacher
-
 
147
    And I navigate to "Templates" in current page administration
-
 
148
    And I open the action menu in "My public template" "table_row"
143
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
149
    Then I should not see "Delete"
144
    And I select "Use a template" from the "jump" singleselect
150
    And I choose "Preview" in the open action menu
145
    And I follow "My public template"
151
    And I press "Actions"
146
    Then I should not see "Delete"
152
    And I should not see "Delete"
147
    And I click on "Back" "link" in the ".tertiary-navigation" "css_element"
153
    And I click on "Back" "link" in the ".tertiary-navigation" "css_element"
148
    And "My course template" "text" should exist in the ".coursetemplates" "css_element"
154
    And "My course template" "text" should exist in the ".coursetemplates" "css_element"
149
    And I follow "My course template"
155
    And I open the action menu in "My course template" "table_row"
150
    And I click on "Delete" "link"
156
    And I choose "Delete" in the open action menu
151
    And I click on "Yes" "button"
-
 
Línea 152... Línea 157...
152
    And I should see "Template deleted"
157
    And I click on "Yes" "button"
153
    And "My course template" "text" should not exist in the ".coursetemplates" "css_element"
158
    And I should see "Template deleted"
154
    And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element"
159
    And "My course template" "text" should not exist in the ".coursetemplates" "css_element"
155
    And I log out
160
    And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element"
156
 
161
 
-
 
162
  @javascript @accessibility
157
  @javascript
163
  Scenario: Manager can delete both course and public templates
-
 
164
    # Save feedback as both public and course template
158
  Scenario: Manager can delete both course and public templates
165
    When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
159
    # Save feedback as both public and course template
166
    And I navigate to "Questions" in current page administration
160
    When I am on the "Learning experience course 1" "feedback activity" page logged in as manager
167
    And the "region-main" "region" should meet accessibility standards with "best-practice" extra tests
161
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
168
    And I press "Actions"
-
 
169
    And I choose "Save as template" in the open action menu
162
    And I press "Save as new template"
170
    And I set the field "Name" to "My public template"
163
    And I set the field "Name" to "My public template"
171
    And I set the field "Available for all courses" to "1"
164
    And I set the field "Public" to "1"
-
 
165
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
172
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
166
    And I press "Save as new template"
173
    And I press "Actions"
167
    And I set the field "Name" to "My course template"
174
    And I choose "Save as template" in the open action menu
168
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
175
    And I set the field "Name" to "My course template"
-
 
176
    And I click on "Save" "button" in the ".modal-dialog" "css_element"
169
    # Delete course template
177
    And I navigate to "Templates" in current page administration
170
    And I select "Use a template" from the "jump" singleselect
178
    And the "region-main" "region" should meet accessibility standards with "best-practice" extra tests
171
    Then "My public template" "text" should exist in the ".publictemplates" "css_element"
179
    And "My course template" "text" should exist in the ".coursetemplates" "css_element"
172
    And "My course template" "text" should exist in the ".coursetemplates" "css_element"
180
    # Delete course template
173
    And I follow "My course template"
181
    And I open the action menu in "My course template" "table_row"
174
    And I click on "Delete" "link"
182
    And I choose "Delete" in the open action menu
175
    And I should see "Are you sure you want to delete this template?"
183
    And I should see "Are you sure you want to delete this template?"
-
 
184
    And I press "Yes"
176
    And I press "Yes"
185
    Then I should see "Template deleted"
-
 
186
    And "My course template" "text" should not exist in the ".coursetemplates" "css_element"
177
    And I should see "Template deleted"
187
    And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element"
-
 
188
    And "My public template" "text" should exist in the ".publictemplates" "css_element"
178
    And "My course template" "text" should not exist in the ".coursetemplates" "css_element"
189
    # Delete course template (through Preview page)
179
    And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element"
190
    And I open the action menu in "My public template" "table_row"
180
    And "My public template" "text" should exist in the ".publictemplates" "css_element"
191
    And I choose "Preview" in the open action menu
181
    And I follow "My public template"
192
    And I press "Actions"
182
    And I click on "Delete" "link"
193
    And I choose "Delete" in the open action menu
183
    And I should see "Are you sure you want to delete this template?"
-
 
184
    And I press "Yes"
-