Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_scorm @_file_upload @_switch_iframe
2
Feature: Scorm multi-sco review mode.
3
  Check review mode and attempt handling.
4
  Background:
5
    Given the following "users" exist:
6
      | username | firstname | lastname | email |
7
      | teacher1 | Teacher | 1 | teacher1@example.com |
8
      | student1 | Student | 1 | student1@example.com |
9
    And the following "courses" exist:
10
      | fullname | shortname | category |
11
      | Course 1 | C1 | 0 |
12
    And the following "course enrolments" exist:
13
      | user | course | role |
14
      | teacher1 | C1 | editingteacher |
15
      | student1 | C1 | student |
16
 
17
  @javascript
18
  Scenario: Test review mode with a single sco completion.
19
    When the following "activities" exist:
20
      | activity | course | name                           | packagefilepath                                               | forcenewattempt |
21
      | scorm    | C1     | Basic Multi-sco SCORM package  | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip      | 0               |
22
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page logged in as student1
23
    And I should see "Enter"
24
    And I press "Enter"
25
    And I switch to "scorm_object" iframe
26
    And I should see "Play of the game"
27
    And I switch to the main frame
28
    And I follow "Exit activity"
29
    And I wait until the page is ready
30
    And I should see "Basic Multi-sco SCORM package"
31
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page
32
    And I should see "Enter"
33
    And I press "Enter"
34
    Then I should not see "Review mode"
35
 
36
  @javascript
37
  Scenario: Test review mode with all scos completed.
38
    When the following "activities" exist:
39
      | activity | course | name                           | packagefilepath                                               | forcenewattempt |
40
      | scorm    | C1     | ADV Multi-sco SCORM package    | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip      | 0               |
41
    And I am on the "ADV Multi-sco SCORM package" "scorm activity" page logged in as student1
42
    And I should see "Enter"
43
    And I press "Enter"
44
    And I switch to "scorm_object" iframe
45
    And I should see "Play of the game"
46
 
47
    And I switch to the main frame
48
    And I click on "Par?" "list_item"
49
    And I switch to "scorm_object" iframe
50
    And I should see "Par"
51
 
52
    And I switch to the main frame
53
    And I click on "Keeping Score" "list_item"
54
    And I switch to "scorm_object" iframe
55
    And I should see "Scoring"
56
 
57
    And I switch to the main frame
58
    And I click on "Other Scoring Systems" "list_item"
59
    And I switch to "scorm_object" iframe
60
    And I should see "Other Scoring Systems"
61
 
62
    And I switch to the main frame
63
    And I click on "The Rules of Golf" "list_item"
64
    And I switch to "scorm_object" iframe
65
    And I should see "The Rules of Golf"
66
 
67
    And I switch to the main frame
68
    And I click on "Playing Golf Quiz" "list_item"
69
    And I switch to "scorm_object" iframe
70
    And I should see "Knowledge Check"
71
 
72
    And I switch to the main frame
73
    And I click on "Taking Care of the Course" "list_item"
74
    And I switch to "scorm_object" iframe
75
    And I should see "Etiquette - Care For the Course"
76
 
77
    And I switch to the main frame
78
    And I click on "Avoiding Distraction" "list_item"
79
    And I switch to "scorm_object" iframe
80
    And I should see "Etiquette - Avoiding Distraction"
81
 
82
    And I switch to the main frame
83
    And I click on "Playing Politely" "list_item"
84
    And I switch to "scorm_object" iframe
85
    And I should see "Etiquette - Playing the Game"
86
 
87
    And I switch to the main frame
88
    And I click on "Etiquette Quiz" "list_item"
89
    And I switch to "scorm_object" iframe
90
    And I should see "Knowledge Check"
91
 
92
    And I switch to the main frame
93
    And I click on "Handicapping Overview" "list_item"
94
    And I switch to "scorm_object" iframe
95
    And I should see "Handicapping"
96
 
97
    And I switch to the main frame
98
    And I click on "Calculating a Handicap" "list_item"
99
    And I switch to "scorm_object" iframe
100
    And I should see "Calculating a Handicap"
101
 
102
    And I switch to the main frame
103
    And I click on "Calculating a Handicapped Score" "list_item"
104
    And I switch to "scorm_object" iframe
105
    And I should see "Calculating a Score"
106
 
107
    And I switch to the main frame
108
    And I click on "Handicapping Example" "list_item"
109
    And I switch to "scorm_object" iframe
110
    And I should see "Calculating a Score"
111
 
112
    And I switch to the main frame
113
    And I click on "Handicapping Quiz" "list_item"
114
    And I switch to "scorm_object" iframe
115
    And I should see "Knowledge Check"
116
 
117
    And I switch to the main frame
118
    And I click on "How to Have Fun Playing Golf" "list_item"
119
    And I switch to "scorm_object" iframe
120
    And I should see "How to Have Fun Golfing"
121
 
122
    And I switch to the main frame
123
    And I click on "How to Make Friends Playing Golf" "list_item"
124
    And I switch to "scorm_object" iframe
125
    And I should see "How to Make Friends on the Golf Course"
126
 
127
    And I switch to the main frame
128
    And I click on "Having Fun Quiz" "list_item"
129
    And I switch to "scorm_object" iframe
130
    And I should see "Knowledge Check"
131
    And I switch to the main frame
132
    And I follow "Exit activity"
133
    And I wait until the page is ready
134
    And I should see "ADV Multi-sco SCORM package"
135
    And I am on the "ADV Multi-sco SCORM package" "scorm activity" page
136
    And I should see "Enter"
137
    And I press "Enter"
138
    Then I should see "Review mode"
139
 
140
  @javascript
141
  Scenario: Test force completed set to Always.
142
    When the following "activities" exist:
143
      | activity | course | name                          | packagefilepath                                               | forcenewattempt |
144
      | scorm    | C1     | Basic Multi-sco SCORM package | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12-mini.zip | 2               |
145
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page logged in as student1
146
    And I should see "Enter"
147
    And I press "Enter"
148
    And I switch to "scorm_object" iframe
149
    And I should see "Play of the game"
150
    And I switch to the main frame
151
    And I follow "Exit activity"
152
    And I wait until the page is ready
153
    And I should see "Basic Multi-sco SCORM package"
154
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page
155
    And I should see "Enter"
156
    And I should not see "Start a new attempt"
157
    And I press "Enter"
158
    Then I should not see "Review mode"
159
    And I switch to "scorm_object" iframe
160
    And I should see "Play of the game"
161
 
162
  @javascript
163
  Scenario: Test force completed set to when previous complete/passed/failed.
164
    When the following "activities" exist:
165
      | activity | course | name                          | packagefilepath                                               | forcenewattempt |
166
      | scorm    | C1     | Basic Multi-sco SCORM package | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12-mini.zip | 1               |
167
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page logged in as student1
168
    And I should see "Enter"
169
    And I press "Enter"
170
    And I switch to "scorm_object" iframe
171
    And I should see "Play of the game"
172
    And I switch to the main frame
173
    And I follow "Exit activity"
174
    And I wait until the page is ready
175
    And I should see "Basic Multi-sco SCORM package"
176
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page
177
    And I should see "Enter"
178
    And I should not see "Start a new attempt"
179
    And I press "Enter"
180
    And I should not see "Review mode"
181
    And I switch to "scorm_object" iframe
182
    And I should see "Par"
183
 
184
    And I switch to the main frame
185
    And I click on "Keeping Score" "list_item"
186
    And I switch to "scorm_object" iframe
187
    And I should see "Scoring"
188
 
189
    And I switch to the main frame
190
    And I click on "Other Scoring Systems" "list_item"
191
    And I switch to "scorm_object" iframe
192
    And I should see "Other Scoring Systems"
193
 
194
    And I switch to the main frame
195
    And I click on "The Rules of Golf" "list_item"
196
    And I switch to "scorm_object" iframe
197
    And I should see "The Rules of Golf"
198
 
199
    And I switch to the main frame
200
    And I click on "Playing Golf Quiz" "list_item"
201
    And I switch to "scorm_object" iframe
202
    And I should see "Knowledge Check"
203
 
204
    And I switch to the main frame
205
    And I click on "How to Have Fun Playing Golf" "list_item"
206
    And I switch to "scorm_object" iframe
207
    And I should see "How to Have Fun Golfing"
208
 
209
    And I switch to the main frame
210
    And I click on "How to Make Friends Playing Golf" "list_item"
211
    And I switch to "scorm_object" iframe
212
    And I should see "How to Make Friends on the Golf Course"
213
 
214
    And I switch to the main frame
215
    And I click on "Having Fun Quiz" "list_item"
216
    And I switch to "scorm_object" iframe
217
    And I should see "Knowledge Check"
218
    And I switch to the main frame
219
    And I follow "Exit activity"
220
    And I wait until the page is ready
221
    And I should see "Basic Multi-sco SCORM package"
222
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page
223
    And I should see "Enter"
224
    And I press "Enter"
225
    Then I should not see "Review mode"
226
    And I switch to "scorm_object" iframe
227
    And I should see "Play of the game"
228
 
229
  @javascript
230
  Scenario: Test force completed set to Always and student skipview
231
    When the following "activities" exist:
232
      | activity | course | name                          | packagefilepath                                               | forcenewattempt | skipview |
233
      | scorm    | C1     | Basic Multi-sco SCORM package | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12-mini.zip | 2               | 2        |
234
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page logged in as student1
235
    And I switch to "scorm_object" iframe
236
    And I should see "Play of the game"
237
    And I switch to the main frame
238
    And I follow "Exit activity"
239
    And I wait until the page is ready
240
    And I should see "Basic Multi-sco SCORM package"
241
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page
242
    Then I should not see "Review mode"
243
    And I switch to "scorm_object" iframe
244
    And I should see "Play of the game"
245
 
246
  @javascript
247
  Scenario: Test force completed set to when previous complete/passed/failed.
248
    When the following "activities" exist:
249
      | activity | course | name                          | packagefilepath                                               | forcenewattempt | skipview |
250
      | scorm    | C1     | Basic Multi-sco SCORM package | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12-mini.zip | 1               | 2        |
251
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page logged in as student1
252
    And I switch to "scorm_object" iframe
253
    And I should see "Play of the game"
254
    And I switch to the main frame
255
    And I follow "Exit activity"
256
    And I wait until the page is ready
257
    And I should see "Basic Multi-sco SCORM package"
258
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page
259
    And I should not see "Review mode"
260
    And I switch to "scorm_object" iframe
261
    And I should see "Par"
262
 
263
    And I switch to the main frame
264
    And I click on "Keeping Score" "list_item"
265
    And I switch to "scorm_object" iframe
266
    And I should see "Scoring"
267
 
268
    And I switch to the main frame
269
    And I click on "Other Scoring Systems" "list_item"
270
    And I switch to "scorm_object" iframe
271
    And I should see "Other Scoring Systems"
272
 
273
    And I switch to the main frame
274
    And I click on "The Rules of Golf" "list_item"
275
    And I switch to "scorm_object" iframe
276
    And I should see "The Rules of Golf"
277
 
278
    And I switch to the main frame
279
    And I click on "Playing Golf Quiz" "list_item"
280
    And I switch to "scorm_object" iframe
281
    And I should see "Knowledge Check"
282
 
283
    And I switch to the main frame
284
    And I click on "How to Have Fun Playing Golf" "list_item"
285
    And I switch to "scorm_object" iframe
286
    And I should see "How to Have Fun Golfing"
287
 
288
    And I switch to the main frame
289
    And I click on "How to Make Friends Playing Golf" "list_item"
290
    And I switch to "scorm_object" iframe
291
    And I should see "How to Make Friends on the Golf Course"
292
 
293
    And I switch to the main frame
294
    And I click on "Having Fun Quiz" "list_item"
295
    And I switch to "scorm_object" iframe
296
    And I should see "Knowledge Check"
297
    And I switch to the main frame
298
    And I follow "Exit activity"
299
    And I wait until the page is ready
300
    And I should see "Basic Multi-sco SCORM package"
301
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page
302
    Then I should not see "Review mode"
303
    And I switch to "scorm_object" iframe
304
    And I should see "Play of the game"