Línea 1... |
Línea 1... |
1 |
@editor @editor_tiny @tiny_h5p @javascript @_file_upload
|
1 |
@editor @editor_tiny @tiny_h5p @javascript
|
2 |
Feature: Use the TinyMCE editor to upload an h5p package
|
2 |
Feature: Use the TinyMCE editor to upload an h5p package
|
3 |
In order to work with h5p
|
3 |
In order to work with h5p
|
4 |
As a content creator
|
4 |
As a content creator
|
5 |
I need to be able to embed H5P packages
|
5 |
I need to be able to embed H5P packages
|
Línea 18... |
Línea 18... |
18 |
| activity | name | intro | introformat | course | content | contentformat | idnumber |
|
18 |
| activity | name | intro | introformat | course | content | contentformat | idnumber |
|
19 |
| page | PageName1 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 |
|
19 |
| page | PageName1 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 |
|
20 |
And the "displayh5p" filter is "on"
|
20 |
And the "displayh5p" filter is "on"
|
21 |
And the following config values are set as admin:
|
21 |
And the following config values are set as admin:
|
22 |
| allowedsources | https://moodle.h5p.com/content/[id] | filter_displayh5p |
|
22 |
| allowedsources | https://moodle.h5p.com/content/[id] | filter_displayh5p |
|
23 |
And the following "blocks" exist:
|
- |
|
24 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
- |
|
25 |
| private_files | System | 1 | my-index | side-post |
|
- |
|
Línea 26... |
Línea 23... |
26 |
|
23 |
|
27 |
@javascript @external
|
24 |
@javascript @external
|
28 |
Scenario: TinyMCE can be used to embed an H5P activity
|
25 |
Scenario: TinyMCE can be used to embed an H5P activity
|
29 |
Given I change window size to "large"
|
26 |
Given I change window size to "large"
|
Línea 36... |
Línea 33... |
36 |
And I switch to "h5pcontent" iframe
|
33 |
And I switch to "h5pcontent" iframe
|
37 |
And I should see "Lorum ipsum"
|
34 |
And I should see "Lorum ipsum"
|
Línea 38... |
Línea 35... |
38 |
|
35 |
|
39 |
@javascript
|
36 |
@javascript
|
40 |
Scenario: TinyMCE can be used to upload and embed an H5P activity
|
37 |
Scenario: TinyMCE can be used to upload and embed an H5P activity
|
- |
|
38 |
Given the following "user private file" exists:
|
- |
|
39 |
| user | admin |
|
41 |
Given I log in as "admin"
|
40 |
| filepath | h5p/tests/fixtures/guess-the-answer.h5p |
|
42 |
And I change window size to "large"
|
- |
|
43 |
And I follow "Manage private files..."
|
- |
|
44 |
And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
|
- |
|
45 |
And I click on "Save changes" "button"
|
41 |
And I change window size to "large"
|
46 |
And I am on the "PageName1" "page activity editing" page
|
42 |
And I am on the "PageName1" "page activity editing" page logged in as "admin"
|
47 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
43 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
48 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
44 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
49 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
45 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
50 |
And I click on "guess-the-answer.h5p" "link"
|
46 |
And I click on "guess-the-answer.h5p" "link"
|
Línea 72... |
Línea 68... |
72 |
And I should see "H5P URL" in the "Insert H5P content" "dialogue"
|
68 |
And I should see "H5P URL" in the "Insert H5P content" "dialogue"
|
73 |
And I should not see "H5P options" in the "Insert H5P content" "dialogue"
|
69 |
And I should not see "H5P options" in the "Insert H5P content" "dialogue"
|
Línea 74... |
Línea 70... |
74 |
|
70 |
|
75 |
@javascript @external
|
71 |
@javascript @external
|
76 |
Scenario: A user can edit H5P content embedding with TinyMCE
|
72 |
Scenario: A user can edit H5P content embedding with TinyMCE
|
77 |
Given I log in as "admin"
|
73 |
Given the following "user private file" exists:
|
78 |
And I follow "Manage private files..."
|
74 |
| user | admin |
|
79 |
And I upload "lib/editor/atto/tests/fixtures/drag.h5p" file to "Files" filemanager
|
- |
|
80 |
And I click on "Save changes" "button"
|
75 |
| filepath | h5p/tests/fixtures/drag.h5p |
|
81 |
And I am on the PageName1 "page activity editing" page
|
76 |
And I am on the "PageName1" "page activity editing" page logged in as "admin"
|
82 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
77 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
83 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
78 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
84 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
79 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
85 |
And I click on "drag" "link"
|
80 |
And I click on "drag" "link"
|
Línea 102... |
Línea 97... |
102 |
And I should see "Lorum ipsum"
|
97 |
And I should see "Lorum ipsum"
|
103 |
And I should not see "Cloudberries"
|
98 |
And I should not see "Cloudberries"
|
Línea 104... |
Línea 99... |
104 |
|
99 |
|
105 |
@javascript
|
100 |
@javascript
|
106 |
Scenario: Enable/disable H5P options tiny
|
101 |
Scenario: Enable/disable H5P options tiny
|
107 |
Given I log in as "admin"
|
102 |
Given the following "user private file" exists:
|
108 |
And I follow "Manage private files..."
|
103 |
| user | admin |
|
109 |
And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
|
- |
|
110 |
And I click on "Save changes" "button"
|
104 |
| filepath | h5p/tests/fixtures/guess-the-answer.h5p |
|
111 |
And I am on the PageName1 "page activity editing" page
|
105 |
And I am on the "PageName1" "page activity editing" page logged in as "admin"
|
112 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
106 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
113 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
107 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
114 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
108 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
115 |
And I click on "guess-the-answer.h5p" "link"
|
109 |
And I click on "guess-the-answer.h5p" "link"
|
Línea 176... |
Línea 170... |
176 |
| username | firstname | lastname | email |
|
170 |
| username | firstname | lastname | email |
|
177 |
| student1 | Student | 1 | student1@example.com |
|
171 |
| student1 | Student | 1 | student1@example.com |
|
178 |
And the following "course enrolments" exist:
|
172 |
And the following "course enrolments" exist:
|
179 |
| user | course | role |
|
173 |
| user | course | role |
|
180 |
| student1 | C1 | student |
|
174 |
| student1 | C1 | student |
|
181 |
And I log in as "admin"
|
175 |
And the following "user private file" exists:
|
182 |
And I follow "Manage private files..."
|
176 |
| user | admin |
|
183 |
And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
|
177 |
| filepath | h5p/tests/fixtures/guess-the-answer.h5p |
|
184 |
And I click on "Save changes" "button"
|
- |
|
185 |
And I am on the PageName1 "page activity editing" page
|
178 |
And I am on the "PageName1" "page activity editing" page logged in as "admin"
|
186 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
179 |
And I click on the "Configure H5P content" button for the "Page content" TinyMCE editor
|
187 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
180 |
And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue"
|
188 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
181 |
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
189 |
And I click on "guess-the-answer.h5p" "link"
|
182 |
And I click on "guess-the-answer.h5p" "link"
|
190 |
And I click on "Select this file" "button"
|
183 |
And I click on "Select this file" "button"
|