mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-69331 core_h5p: Add missing library files to behat tests
Some of the pre-existing behat tests were creating content into the content bank using the generator but the H5P content-type libraries weren't uploaded. Since MDL-69331, libraries need to be deployed previously (so fake H5P content-type won't be displayed if these libraries don't exist).
This commit is contained in:
parent
39fa45e299
commit
f3d43c76bc
@ -1,11 +1,15 @@
|
||||
@core @core_backup @core_contentbank
|
||||
@core @core_backup @core_contentbank @_file_upload @javascript
|
||||
Feature: Import course content bank content
|
||||
In order to import content from a course contentbank
|
||||
As a teacher
|
||||
I need to confirm that errors will not happen
|
||||
|
||||
Background:
|
||||
Given the following "courses" exist:
|
||||
Given I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/ipsums.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| Course 2 | C2 | 0 |
|
||||
@ -17,8 +21,9 @@ Feature: Import course content bank content
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| teacher1 | C2 | editingteacher |
|
||||
And the following "contentbank content" exist:
|
||||
| contextlevel | reference | contenttype | user | contentname |
|
||||
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p |
|
||||
| contextlevel | reference | contenttype | user | contentname | filepath |
|
||||
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p | /h5p/tests/fixtures/ipsums.h5p |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
|
||||
Scenario: Import content bank content to another course
|
||||
|
@ -5,7 +5,13 @@ Feature: Manage H5P content from the content bank
|
||||
I need to be able to edit any H5P content in the content bank
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
Given I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And I upload "h5p/tests/fixtures/ipsums.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
@ -15,10 +21,9 @@ Feature: Manage H5P content from the content bank
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And the following "contentbank content" exist:
|
||||
| contextlevel | reference | contenttype | user | contentname |
|
||||
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p |
|
||||
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p |
|
||||
And I log in as "admin"
|
||||
| contextlevel | reference | contenttype | user | contentname | filepath |
|
||||
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p | /h5p/tests/fixtures/ipsums.h5p |
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I log out
|
||||
|
@ -5,7 +5,13 @@ Feature: Replace H5P file from an existing content requires special capabilities
|
||||
I need to be able to replace the content only if certain capabilities are allowed
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
Given I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/ipsums.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "categories" exist:
|
||||
@ -21,6 +27,7 @@ Feature: Replace H5P file from an existing content requires special capabilities
|
||||
| contextlevel | reference | contenttype | user | contentname | filepath |
|
||||
| Course | C1 | contenttype_h5p | admin | admincontent | /h5p/tests/fixtures/ipsums.h5p |
|
||||
| Course | C1 | contenttype_h5p | teacher1 | teachercontent | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
|
@ -37,7 +37,14 @@ Feature: H5P file upload to content bank for non admins
|
||||
Then I should see "Content bank"
|
||||
|
||||
Scenario: Teachers can upload .h5p extension files to course content bank
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
Given I log out
|
||||
And I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
@ -52,7 +59,14 @@ Feature: H5P file upload to content bank for non admins
|
||||
And I should see "filltheblanks.h5p"
|
||||
|
||||
Scenario: Other teachers can see uploaded H5P contents
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
Given I log out
|
||||
And I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
|
@ -117,7 +117,12 @@ Feature: Content bank use editor feature
|
||||
Then the field "Title" matches value "New title"
|
||||
|
||||
Scenario: Teachers can edit their own content in the content bank
|
||||
Given the following "users" exist:
|
||||
Given I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And I upload "h5p/tests/fixtures/ipsums.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
|
@ -5,14 +5,18 @@ Feature: Confirm content bank events are triggered
|
||||
I need to be able to check triggered events
|
||||
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "contentbank content" exist:
|
||||
| contextlevel | reference | contenttype | user | contentname |
|
||||
| Course | C1 | contenttype_h5p | admin | Existing |
|
||||
And I log in as "admin"
|
||||
And I follow "Manage private files..."
|
||||
| contextlevel | reference | contenttype | user | contentname | filepath |
|
||||
| Course | C1 | contenttype_h5p | admin | Existing | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
And I am on site homepage
|
||||
And I follow "Private files"
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
|
||||
And I click on "Save changes" "button"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
|
@ -5,20 +5,23 @@ Feature: Search content in the content bank
|
||||
I need to be able to search content in the content bank
|
||||
|
||||
Background:
|
||||
Given the following "contentbank content" exist:
|
||||
| contextlevel | reference | contenttype | user | contentname |
|
||||
| System | | contenttype_h5p | admin | santjordi.h5p |
|
||||
| System | | contenttype_h5p | admin | santjordi_rose.h5p |
|
||||
| System | | contenttype_h5p | admin | SantJordi_book |
|
||||
| System | | contenttype_h5p | admin | Dragon_santjordi.h5p |
|
||||
| System | | contenttype_h5p | admin | princess.h5p |
|
||||
| System | | contenttype_h5p | admin | mathsbook.h5p |
|
||||
| System | | contenttype_h5p | admin | historybook.h5p |
|
||||
| System | | contenttype_h5p | admin | santvicenc.h5p |
|
||||
Given I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And the following "contentbank content" exist:
|
||||
| contextlevel | reference | contenttype | user | contentname | filepath |
|
||||
| System | | contenttype_h5p | admin | santjordi.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | santjordi_rose.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | SantJordi_book | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | Dragon_santjordi.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | princess.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | mathsbook.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | historybook.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | santvicenc.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
|
||||
Scenario: Admins can search content in the content bank
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
Given I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
|
@ -1,28 +1,31 @@
|
||||
@core @core_contentbank @contentbank_h5p @javascript
|
||||
@core @core_contentbank @contentbank_h5p @_file_upload @javascript
|
||||
Feature: Sort content in the content bank
|
||||
In order to temporarily organise the content of the content bank
|
||||
As an admin
|
||||
I need to be able to sort the content bank in various ways
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
Given I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| manager | Max | Manager | man@example.com |
|
||||
And the following "role assigns" exist:
|
||||
| user | role | contextlevel | reference |
|
||||
| manager | manager | System | |
|
||||
And the following "contentbank content" exist:
|
||||
| contextlevel | reference | contenttype | user | contentname |
|
||||
| System | | contenttype_h5p | admin | Dragon_santjordi.h5p |
|
||||
| System | | contenttype_h5p | admin | mathsbook.h5p |
|
||||
| System | | contenttype_h5p | manager | historybook.h5p |
|
||||
| System | | contenttype_h5p | admin | santjordi.h5p |
|
||||
| System | | contenttype_h5p | admin | santjordi_rose.h5p |
|
||||
| System | | contenttype_h5p | admin | SantJordi_book |
|
||||
| contextlevel | reference | contenttype | user | contentname | filepath |
|
||||
| System | | contenttype_h5p | admin | Dragon_santjordi.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | mathsbook.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | manager | historybook.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | santjordi.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | santjordi_rose.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
| System | | contenttype_h5p | admin | SantJordi_book | /h5p/tests/fixtures/filltheblanks.h5p |
|
||||
|
||||
Scenario: Admins can order content in the content bank
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
Given I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
@ -38,8 +41,7 @@ Feature: Sort content in the content bank
|
||||
Then "santjordi_rose.h5p" "text" should appear before "SantJordi_book" "text"
|
||||
|
||||
Scenario: Admins can order content depending on the author
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
Given I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
|
@ -1,4 +1,4 @@
|
||||
@core @core_contentbank @contentbank_h5p @javascript
|
||||
@core @core_contentbank @contentbank_h5p @_file_upload @javascript
|
||||
Feature: Make content public or unlisted
|
||||
In order to make content public or unlisted
|
||||
As a user
|
||||
@ -13,6 +13,9 @@ Feature: Make content public or unlisted
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
|
||||
Scenario: Users can make their content public or unlisted
|
||||
Given the following "contentbank content" exist:
|
||||
|
Loading…
x
Reference in New Issue
Block a user