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 completion
3
  In order to let students access a scorm package
4
  As a teacher
5
  I need to add scorm activity to a course
6
  Background:
7
    Given the following "users" exist:
8
      | username | firstname | lastname | email |
9
      | teacher1 | Teacher | 1 | teacher1@example.com |
10
      | student1 | Student | 1 | student1@example.com |
11
    And the following "course" exists:
12
      | fullname         | Course 1 |
13
      | shortname        | C1       |
14
      | enablecompletion | 1        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
 
20
  @javascript
21
  Scenario: Test completion with a single sco completion.
22
    Given the following "activity" exists:
23
      | activity                 | scorm                                                    |
24
      | course                   | C1                                                       |
25
      | name                     | Basic Multi-sco SCORM package                            |
26
      | completion               | 2                                                        |
27
      # Add requirements
28
      | completionstatusallscos  | 0                                                        |
29
      | packagefilepath          | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip |
30
      | completionstatusrequired | 4                                                        |
31
    And I am on the "Basic Multi-sco SCORM package" "scorm activity" page logged in as student1
32
    And I should see "Enter"
33
    And I press "Enter"
34
    And I switch to "scorm_object" iframe
35
    And I should see "Play of the game"
36
    And I switch to the main frame
37
    And I follow "Exit activity"
38
    And I wait until the page is ready
39
    Then I should see "Basic Multi-sco SCORM package" in the "page" "region"
40
    And I am on homepage
41
    And I log out
42
    And I am on the "Course 1" course page logged in as teacher1
43
    Then "Student 1" user has completed "Basic Multi-sco SCORM package" activity
44
 
45
  @javascript
46
  Scenario: Test completion with all scos and correct sco load on re-entry.
47
    Given the following "activity" exists:
48
      | activity                | scorm                                                    |
49
      | course                  | C1                                                       |
50
      | name                    | ADV Multi-sco SCORM package                              |
51
      | completion              | 2                                                        |
52
      # Add requirements
53
      | packagefilepath         | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip |
54
      | completionstatusallscos | 1                                                        |
55
    And I am on the "ADV Multi-sco SCORM package" "scorm activity" page logged in as student1
56
    And I should see "Enter"
57
    And I press "Enter"
58
    And I switch to "scorm_object" iframe
59
    And I should see "Play of the game"
60
    And I switch to the main frame
61
    And I follow "Exit activity"
62
    And I wait until the page is ready
63
    Then I should see "ADV Multi-sco SCORM package" in the "page" "region"
64
    And I am on homepage
65
    And I log out
66
 
67
    And I am on the "Course 1" course page logged in as teacher1
68
    Then "Student 1" user has not completed "ADV Multi-sco SCORM package" activity
69
    And I log out
70
    And I am on the "ADV Multi-sco SCORM package" "scorm activity" page logged in as student1
71
    And I should see "Enter"
72
    And I press "Enter"
73
    And I switch to "scorm_object" iframe
74
    And I should see "Par"
75
 
76
    And I switch to the main frame
77
    And I click on "Keeping Score" "list_item"
78
    And I switch to "scorm_object" iframe
79
    And I should see "Scoring"
80
 
81
    And I switch to the main frame
82
    And I click on "Other Scoring Systems" "list_item"
83
    And I switch to "scorm_object" iframe
84
    And I should see "Other Scoring Systems"
85
 
86
    And I switch to the main frame
87
    And I click on "The Rules of Golf" "list_item"
88
    And I switch to "scorm_object" iframe
89
    And I should see "The Rules of Golf"
90
 
91
    And I switch to the main frame
92
    And I click on "Playing Golf Quiz" "list_item"
93
    And I switch to "scorm_object" iframe
94
    And I should see "Knowledge Check"
95
 
96
    And I switch to the main frame
97
    And I click on "Taking Care of the Course" "list_item"
98
    And I switch to "scorm_object" iframe
99
    And I should see "Etiquette - Care For the Course"
100
 
101
    And I switch to the main frame
102
    And I click on "Avoiding Distraction" "list_item"
103
    And I switch to "scorm_object" iframe
104
    And I should see "Etiquette - Avoiding Distraction"
105
 
106
    And I switch to the main frame
107
    And I click on "Playing Politely" "list_item"
108
    And I switch to "scorm_object" iframe
109
    And I should see "Etiquette - Playing the Game"
110
 
111
    And I switch to the main frame
112
    And I click on "Etiquette Quiz" "list_item"
113
    And I switch to "scorm_object" iframe
114
    And I should see "Knowledge Check"
115
 
116
    And I switch to the main frame
117
    And I click on "Handicapping Overview" "list_item"
118
    And I switch to "scorm_object" iframe
119
    And I should see "Handicapping"
120
 
121
    And I switch to the main frame
122
    And I click on "Calculating a Handicap" "list_item"
123
    And I switch to "scorm_object" iframe
124
    And I should see "Calculating a Handicap"
125
 
126
    And I switch to the main frame
127
    And I click on "Calculating a Handicapped Score" "list_item"
128
    And I switch to "scorm_object" iframe
129
    And I should see "Calculating a Score"
130
 
131
    And I switch to the main frame
132
    And I click on "Handicapping Example" "list_item"
133
    And I switch to "scorm_object" iframe
134
    And I should see "Calculating a Score"
135
 
136
    And I switch to the main frame
137
    And I click on "Handicapping Quiz" "list_item"
138
    And I switch to "scorm_object" iframe
139
    And I should see "Knowledge Check"
140
 
141
    And I switch to the main frame
142
    And I click on "How to Have Fun Playing Golf" "list_item"
143
    And I switch to "scorm_object" iframe
144
    And I should see "How to Have Fun Golfing"
145
 
146
    And I switch to the main frame
147
    And I click on "How to Make Friends Playing Golf" "list_item"
148
    And I switch to "scorm_object" iframe
149
    And I should see "How to Make Friends on the Golf Course"
150
 
151
    And I switch to the main frame
152
    And I click on "Having Fun Quiz" "list_item"
153
    And I switch to "scorm_object" iframe
154
    And I should see "Knowledge Check"
155
    And I switch to the main frame
156
    And I follow "Exit activity"
157
    And I wait until the page is ready
158
    Then I should see "ADV Multi-sco SCORM package" in the "page" "region"
159
    And I log out
160
    And I am on the "Course 1" course page logged in as teacher1
161
    And "Student 1" user has completed "ADV Multi-sco SCORM package" activity