| Línea 41... |
Línea 41... |
| 41 |
|
41 |
|
| 42 |
@javascript
|
42 |
@javascript
|
| 43 |
Scenario: Manual completion should update the course index completion
|
43 |
Scenario: Manual completion should update the course index completion
|
| 44 |
Given I am on the "C1" "Course" page logged in as "student1"
|
44 |
Given I am on the "C1" "Course" page logged in as "student1"
|
| - |
|
45 |
And "To do" "icon" should exist in the "courseindex-content" "region"
|
| 45 |
And "To do" "icon" should exist in the "courseindex-content" "region"
|
46 |
# Mark an uncompleted activity as completed.
|
| 46 |
When I press "Mark as done"
|
47 |
When I press "Mark as done"
|
| 47 |
And I wait until "Done" "button" exists
|
48 |
And I wait until "Done" "button" exists
|
| 48 |
Then "Done" "icon" should exist in the "courseindex-content" "region"
|
49 |
Then "Done" "icon" should exist in the "courseindex-content" "region"
|
| 49 |
And I press "Done"
|
50 |
And I press "Done"
|
| 50 |
And I wait until "Mark as done" "button" exists
|
51 |
And I wait until "Mark as done" "button" exists
|
| - |
|
52 |
And "To do" "icon" should exist in the "courseindex-content" "region"
|
| - |
|
53 |
# Mark an completed activity as uncompleted (to discard any possible JS dependency, see MDL-84243).
|
| - |
|
54 |
And I press "Mark as done"
|
| - |
|
55 |
And I wait until "Done" "button" exists
|
| - |
|
56 |
And I reload the page
|
| - |
|
57 |
And "Done" "icon" should exist in the "courseindex-content" "region"
|
| - |
|
58 |
And I press "Done"
|
| - |
|
59 |
And I wait until "Mark as done" "button" exists
|
| - |
|
60 |
And "To do" "icon" should exist in the "courseindex-content" "region"
|
| - |
|
61 |
And I press "Mark as done"
|
| - |
|
62 |
And I wait until "Done" "button" exists
|
| Línea 51... |
Línea 63... |
| 51 |
And "To do" "icon" should exist in the "courseindex-content" "region"
|
63 |
Then "Done" "icon" should exist in the "courseindex-content" "region"
|
| 52 |
|
64 |
|
| 53 |
@javascript
|
65 |
@javascript
|
| 54 |
Scenario: Manual completion in an activity page should update the course index
|
66 |
Scenario: Manual completion in an activity page should update the course index
|
| Línea 136... |
Línea 148... |
| 136 |
And user "student1" has attempted "Test quiz name" with responses:
|
148 |
And user "student1" has attempted "Test quiz name" with responses:
|
| 137 |
| slot | response |
|
149 |
| slot | response |
|
| 138 |
| 1 | False |
|
150 |
| 1 | False |
|
| 139 |
When I am on the "C1" "Course" page logged in as "student1"
|
151 |
When I am on the "C1" "Course" page logged in as "student1"
|
| 140 |
And "Done" "icon" should exist in the "courseindex-content" "region"
|
152 |
And "Done" "icon" should exist in the "courseindex-content" "region"
|
| 141 |
|
- |
|
| 142 |
@javascript
|
- |
|
| 143 |
Scenario: Activities with custom completion rules could fail
|
- |
|
| 144 |
Given the following "activity" exists:
|
- |
|
| 145 |
| activity | scorm |
|
- |
|
| 146 |
| course | C1 |
|
- |
|
| 147 |
| name | Music history |
|
- |
|
| 148 |
| packagefilepath | mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12-mini.zip |
|
- |
|
| 149 |
| maxattempt | 1 |
|
- |
|
| 150 |
| latattemptlock | 1 |
|
- |
|
| 151 |
# Add requirements
|
- |
|
| 152 |
| completion | 2 |
|
- |
|
| 153 |
| completionscorerequired | 90 |
|
- |
|
| 154 |
Given I am on the "Music history" "scorm activity" page logged in as student1
|
- |
|
| 155 |
# We need a little taller window because Firefox is, apparently, unable to auto-scroll within
|
- |
|
| 156 |
# an iframe, so we need to ensure that the "Save changes" button is visible in the viewport.
|
- |
|
| 157 |
And I change window size to "large"
|
- |
|
| 158 |
And I press "Enter"
|
- |
|
| 159 |
And I switch to the main frame
|
- |
|
| 160 |
And I click on "Par?" "list_item"
|
- |
|
| 161 |
And I switch to "scorm_object" iframe
|
- |
|
| 162 |
And I wait until the page is ready
|
- |
|
| 163 |
And I switch to the main frame
|
- |
|
| 164 |
And I click on "Keeping Score" "list_item"
|
- |
|
| 165 |
And I switch to "scorm_object" iframe
|
- |
|
| 166 |
And I wait until the page is ready
|
- |
|
| 167 |
And I switch to the main frame
|
- |
|
| 168 |
And I click on "Other Scoring Systems" "list_item"
|
- |
|
| 169 |
And I switch to "scorm_object" iframe
|
- |
|
| 170 |
And I wait until the page is ready
|
- |
|
| 171 |
And I switch to the main frame
|
- |
|
| 172 |
And I click on "The Rules of Golf" "list_item"
|
- |
|
| 173 |
And I switch to "scorm_object" iframe
|
- |
|
| 174 |
And I wait until the page is ready
|
- |
|
| 175 |
And I switch to the main frame
|
- |
|
| 176 |
And I click on "Playing Golf Quiz" "list_item"
|
- |
|
| 177 |
And I switch to "scorm_object" iframe
|
- |
|
| 178 |
And I wait until the page is ready
|
- |
|
| 179 |
And I click on "[id='question_com.scorm.golfsamples.interactions.playing_1_1']" "css_element"
|
- |
|
| 180 |
And I press "Submit Answers"
|
- |
|
| 181 |
And I wait until "Score: 20" "text" exists
|
- |
|
| 182 |
And I switch to the main frame
|
- |
|
| 183 |
And I click on "Exit activity" "link"
|
- |
|
| 184 |
And "Failed" "icon" should exist in the "courseindex-content" "region"
|
- |
|