Skip to content

Commit

Permalink
Merge branch 'MDL-69331-fix' of github.com:sarjona/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Apr 16, 2021
2 parents e37158b + ef557b9 commit 26d8cc9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions backup/util/ui/tests/behat/import_contentbank_content.feature
Expand Up @@ -6,6 +6,13 @@ Feature: Import course content bank content

Background:
Given I log in as "admin"
And I am on site homepage
And I turn editing mode on
And I add the "Navigation" block if not present
And I configure the "Navigation" block
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/ipsums.h5p" file to "H5P content type" filemanager
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
Expand All @@ -28,23 +35,29 @@ Feature: Import course content bank content

Scenario: Import content bank content to another course
Given I am on "Course 2" course homepage
And I expand "Site pages" node
And I click on "Content bank" "link"
And I should not see "ipsums.h5p"
When I import "Course 1" course into "Course 2" course using this options:
And I expand "Site pages" node
And I click on "Content bank" "link"
Then I should see "ipsums.h5p"
And I am on "Course 1" course homepage
And I expand "Site pages" node
And I click on "Content bank" "link"
And I should see "ipsums.h5p"

Scenario: User could configure not to import content bank
Given I am on "Course 2" course homepage
And I expand "Site pages" node
And I click on "Content bank" "link"
And I should not see "ipsums.h5p"
When I import "Course 1" course into "Course 2" course using this options:
| Initial | Include content bank content | 0 |
And I expand "Site pages" node
And I click on "Content bank" "link"
Then I should not see "ipsums.h5p"
And I am on "Course 1" course homepage
And I expand "Site pages" node
And I click on "Content bank" "link"
And I should see "ipsums.h5p"
4 changes: 2 additions & 2 deletions contentbank/tests/behat/events.feature
Expand Up @@ -15,8 +15,8 @@ Feature: Confirm content bank events are triggered
And the following "contentbank content" exist:
| 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 follow "Dashboard" in the user menu
And I follow "Manage 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
Expand Down
2 changes: 1 addition & 1 deletion filter/displayh5p/tests/behat/h5p_filter.feature
Expand Up @@ -186,7 +186,7 @@ Feature: Render H5P content using filters
Scenario: Render local H5P file with a disabled main library
Given I log in as "admin"
# Upload H5P file to private files.
And I follow "Private files"
And I follow "Manage private files..."
And I upload "h5p/tests/fixtures/ipsums.h5p" file to "Files" filemanager
And I click on "Save changes" "button"
# Upload manually the H5P content-type library and disable it.
Expand Down

0 comments on commit 26d8cc9

Please sign in to comment.