mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Merge branch 'MDL-67464-master' of git://github.com/sarjona/moodle
This commit is contained in:
commit
a12befdcf7
@ -19,14 +19,16 @@ Feature: Render H5P content using filters
|
||||
| page | PageName1 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 |
|
||||
| page | PageName2 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 |
|
||||
And the "displayh5p" filter is "on"
|
||||
And the following config values are set as admin:
|
||||
| allowedsources | https://moodle.h5p.com/content/[id]/embed | filter_displayh5p |
|
||||
|
||||
@javascript
|
||||
@javascript @external
|
||||
Scenario: Render an external H5P content URL.
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "PageName1"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the field "Page content" to "<div>Go for it</div>https://h5p.org/h5p/embed/576651"
|
||||
And I set the field "Page content" to "<div>Go for it</div>https://moodle.h5p.com/content/1290772960722742119/embed"
|
||||
When I click on "Save and display" "button"
|
||||
And I wait until the page is ready
|
||||
And I switch to "h5p-iframe" class iframe
|
||||
@ -38,7 +40,8 @@ Feature: Render H5P content using filters
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "PageName1"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the field "Page content" to "<a href='https://h5p.org/h5p/embed/576651'>Go to https://h5p.org/h5p/embed/576651</a>"
|
||||
# This content won't be displayed, so this scenario shouldn't be labeled as external.
|
||||
And I set the field "Page content" to "<a href='https://moodle.h5p.com/content/1290772960722742119/embed'>Go to https://moodle.h5p.com/content/1290772960722742119/embed</a>"
|
||||
When I click on "Save and display" "button"
|
||||
And I wait until the page is ready
|
||||
Then ".h5p-iframe" "css_element" should not exist
|
||||
|
@ -16,8 +16,10 @@ Feature: Add h5ps to Atto
|
||||
| activity | name | intro | introformat | course | content | contentformat | idnumber |
|
||||
| page | PageName1 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 |
|
||||
And the "displayh5p" filter is "on"
|
||||
And the following config values are set as admin:
|
||||
| allowedsources | https://moodle.h5p.com/content/[id]/embed | filter_displayh5p |
|
||||
|
||||
@javascript
|
||||
@javascript @external
|
||||
Scenario: Insert an embedded h5p
|
||||
Given I log in as "admin"
|
||||
And I change window size to "large"
|
||||
@ -25,11 +27,14 @@ Feature: Add h5ps to Atto
|
||||
And I follow "PageName1"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
|
||||
And I set the field with xpath "//textarea[@data-region='h5purl']" to "https://h5p.org/h5p/embed/576651"
|
||||
And I set the field with xpath "//textarea[@data-region='h5purl']" to "https://moodle.h5p.com/content/1290772960722742119/embed"
|
||||
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
|
||||
And I wait until the page is ready
|
||||
When I click on "Save and display" "button"
|
||||
Then ".h5p-placeholder" "css_element" should exist
|
||||
And I wait until the page is ready
|
||||
And I switch to "h5pcontent" iframe
|
||||
And I should see "Lorum ipsum"
|
||||
|
||||
@javascript
|
||||
Scenario: Insert an h5p file
|
||||
@ -58,7 +63,8 @@ Feature: Add h5ps to Atto
|
||||
And I follow "PageName1"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
|
||||
And I set the field with xpath "//textarea[@data-region='h5purl']" to "ftp://h5p.org/h5p/embed/576651"
|
||||
# This is not a real external URL, so this scenario shouldn't be labeled as external.
|
||||
And I set the field with xpath "//textarea[@data-region='h5purl']" to "ftp://moodle.h5p.com/content/1290772960722742119/embed"
|
||||
When I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
|
||||
And I wait until the page is ready
|
||||
Then I should see "Invalid URL" in the "Insert H5P" "dialogue"
|
||||
@ -99,7 +105,7 @@ Feature: Add h5ps to Atto
|
||||
And I click on "Insert H5P" "button"
|
||||
Then I should not see "H5P file upload" in the "Insert H5P" "dialogue"
|
||||
|
||||
@javascript
|
||||
@javascript @external
|
||||
Scenario: Edit H5P content
|
||||
Given I log in as "admin"
|
||||
And I follow "Manage private files..."
|
||||
@ -126,10 +132,11 @@ Feature: Add h5ps to Atto
|
||||
And I click on ".h5p-placeholder" "css_element"
|
||||
And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
|
||||
# External URL
|
||||
And I set the field with xpath "//textarea[@data-region='h5purl']" to "https://h5p.org/h5p/embed/576651"
|
||||
And I set the field with xpath "//textarea[@data-region='h5purl']" to "https://moodle.h5p.com/content/1290772960722742119/embed"
|
||||
And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue"
|
||||
And I wait until the page is ready
|
||||
And I click on "Save and display" "button"
|
||||
And I wait until the page is ready
|
||||
And I switch to "h5pcontent" iframe
|
||||
And I should see "Lorum ipsum"
|
||||
And I should not see "Cloudberries"
|
||||
|
Loading…
x
Reference in New Issue
Block a user