From b3209c0ac5dfd48f484dc2df649a87f05f15bdce Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Fri, 16 Apr 2021 10:52:13 +0200 Subject: [PATCH] MDL-69331 core_h5p: fix behat errors --- .../tests/behat/import_contentbank_content.feature | 13 +++++++++++++ contentbank/tests/behat/events.feature | 4 ++-- filter/displayh5p/tests/behat/h5p_filter.feature | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/backup/util/ui/tests/behat/import_contentbank_content.feature b/backup/util/ui/tests/behat/import_contentbank_content.feature index 30695926154..0417651f68b 100644 --- a/backup/util/ui/tests/behat/import_contentbank_content.feature +++ b/backup/util/ui/tests/behat/import_contentbank_content.feature @@ -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" @@ -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" diff --git a/contentbank/tests/behat/events.feature b/contentbank/tests/behat/events.feature index 99aeaf9e856..6ed11b0faf0 100644 --- a/contentbank/tests/behat/events.feature +++ b/contentbank/tests/behat/events.feature @@ -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 diff --git a/filter/displayh5p/tests/behat/h5p_filter.feature b/filter/displayh5p/tests/behat/h5p_filter.feature index 2663b44347a..5203f4bef37 100644 --- a/filter/displayh5p/tests/behat/h5p_filter.feature +++ b/filter/displayh5p/tests/behat/h5p_filter.feature @@ -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.