Línea 1... |
Línea 1... |
1 |
@mod @mod_h5pactivity @core_h5p @_file_upload @_switch_iframe
|
1 |
@mod @mod_h5pactivity @core_h5p @_switch_iframe
|
2 |
Feature: Content bank link in the activity settings form
|
2 |
Feature: Content bank link in the activity settings form
|
3 |
In order to have direct access to the Content bank
|
3 |
In order to have direct access to the Content bank
|
4 |
As a teacher
|
4 |
As a teacher
|
5 |
I need to see a Content bank link in the activity settings
|
5 |
I need to see a Content bank link in the activity settings
|
Línea 15... |
Línea 15... |
15 |
| user | course | role |
|
15 |
| user | course | role |
|
16 |
| teacher1 | C1 | editingteacher |
|
16 |
| teacher1 | C1 | editingteacher |
|
17 |
And the following "contentbank content" exist:
|
17 |
And the following "contentbank content" exist:
|
18 |
| contextlevel | reference | contenttype | user | contentname | filepath |
|
18 |
| contextlevel | reference | contenttype | user | contentname | filepath |
|
19 |
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
19 |
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
20 |
And the following "blocks" exist:
|
- |
|
21 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
- |
|
22 |
| private_files | System | 1 | my-index | side-post |
|
- |
|
Línea 23... |
Línea 20... |
23 |
|
20 |
|
24 |
@javascript
|
21 |
@javascript
|
25 |
Scenario: The content bank link should go to the course Content bank
|
22 |
Scenario: The content bank link should go to the course Content bank
|
26 |
When I log in as "teacher1"
|
23 |
When I log in as "teacher1"
|
Línea 83... |
Línea 80... |
83 |
When I navigate to "Settings" in current page administration
|
80 |
When I navigate to "Settings" in current page administration
|
84 |
Then I should see "Use the content bank (opens in new window) to manage your H5P files"
|
81 |
Then I should see "Use the content bank (opens in new window) to manage your H5P files"
|
Línea 85... |
Línea 82... |
85 |
|
82 |
|
86 |
@javascript
|
83 |
@javascript
|
87 |
Scenario: The content bank link should go to the course Content bank if the file is referenced but to another repository
|
84 |
Scenario: The content bank link should go to the course Content bank if the file is referenced but to another repository
|
88 |
Given I log in as "admin"
|
85 |
Given the following "user private file" exists:
|
89 |
And I follow "Manage private files..."
|
86 |
| user | admin |
|
90 |
And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
|
87 |
| filepath | h5p/tests/fixtures/guess-the-answer.h5p |
|
91 |
And I click on "Save changes" "button"
|
88 |
When I log in as "admin"
|
92 |
And I add an h5pactivity activity to course "Course 1" section "1"
|
89 |
And I add an h5pactivity activity to course "Course 1" section "1"
|
93 |
And I set the following fields to these values:
|
90 |
And I set the following fields to these values:
|
94 |
| Name | H5P package added with link to content bank |
|
91 |
| Name | H5P package added with link to content bank |
|
95 |
| Description | Description |
|
92 |
| Description | Description |
|
Línea 101... |
Línea 98... |
101 |
And I click on "Save and display" "button"
|
98 |
And I click on "Save and display" "button"
|
102 |
And I switch to "h5p-player" class iframe
|
99 |
And I switch to "h5p-player" class iframe
|
103 |
And I switch to "h5p-iframe" class iframe
|
100 |
And I switch to "h5p-iframe" class iframe
|
104 |
And I should see "Which fruit is this?"
|
101 |
And I should see "Which fruit is this?"
|
105 |
And I switch to the main frame
|
102 |
And I switch to the main frame
|
106 |
When I navigate to "Settings" in current page administration
|
103 |
And I navigate to "Settings" in current page administration
|
107 |
Then I should see "Use the content bank (opens in new window) to manage your H5P files"
|
104 |
Then I should see "Use the content bank (opens in new window) to manage your H5P files"
|