1 |
efrain |
1 |
@mod @mod_scorm @_file_upload @_switch_iframe
|
|
|
2 |
Feature: Add scorm activity
|
|
|
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 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario: Add a scorm activity to a course
|
|
|
9 |
Given the following "users" exist:
|
|
|
10 |
| username | firstname | lastname | email |
|
|
|
11 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
12 |
| student1 | Student | 1 | student1@example.com |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname | category |
|
|
|
15 |
| Course 1 | C1 | 0 |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
When I log in as "teacher1"
|
|
|
21 |
And I add a scorm activity to course "Course 1" section "1"
|
|
|
22 |
And I set the following fields to these values:
|
|
|
23 |
| Name | Awesome SCORM package |
|
|
|
24 |
| Description | Description |
|
|
|
25 |
And I upload "mod/scorm/tests/packages/singlesco_scorm12.zip" file to "Package file" filemanager
|
|
|
26 |
And I click on "Save and display" "button"
|
|
|
27 |
Then I should see "Awesome SCORM package"
|
|
|
28 |
And I should see "Enter"
|
|
|
29 |
And I should see "Preview"
|
|
|
30 |
And I log out
|
|
|
31 |
And I am on the "Awesome 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 "Not implemented yet"
|
|
|
36 |
And I switch to the main frame
|
|
|
37 |
And I am on "Course 1" course homepage
|