From 3dc1e94b9d778b5f0e3b832893c9be8bb18bc5f7 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 29 Feb 2024 08:39:09 +0800 Subject: [PATCH] MDL-68674 behat: make content bank steps more specific --- contentbank/tests/behat/edit_content.feature | 4 ++-- contentbank/tests/behat/visibility.feature | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contentbank/tests/behat/edit_content.feature b/contentbank/tests/behat/edit_content.feature index cf2e5853ce599..65569f346a247 100644 --- a/contentbank/tests/behat/edit_content.feature +++ b/contentbank/tests/behat/edit_content.feature @@ -62,7 +62,7 @@ Feature: Content bank use editor feature And I switch to "h5p-editor-iframe" class iframe And I switch to the main frame And I click on "Cancel" "button" - And I should see "filltheblanks.h5p" in the "h2" "css_element" + And "filltheblanks.h5p" "heading" should exist Scenario: Users can create new content if they have the required permission Given I navigate to "H5P > Manage H5P content types" in site administration @@ -116,7 +116,7 @@ Feature: Content bank use editor feature And I set the field "Title" to "New title" And I switch to the main frame When I click on "Save" "button" - And I should see "filltheblanks.h5p" in the "h2" "css_element" + And "filltheblanks.h5p" "heading" should exist And I click on "Edit" "link" And I switch to "h5p-editor-iframe" class iframe Then the field "Title" matches value "New title" diff --git a/contentbank/tests/behat/visibility.feature b/contentbank/tests/behat/visibility.feature index 231f5e57f7f69..6f1847d0be40a 100644 --- a/contentbank/tests/behat/visibility.feature +++ b/contentbank/tests/behat/visibility.feature @@ -27,12 +27,12 @@ Feature: Make content public or unlisted And I click on "Content bank" "link" in the "Navigation" "block" And I click on "filltheblanks.h5p" "link" And I wait until the page is ready - And I should not see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element" + And "filltheblanks.h5p (Unlisted)" "heading" should not exist And I click on "More" "button" And I should see "Make unlisted" And I click on "Make unlisted" "link" And I wait until the page is ready - Then I should see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element" + Then "filltheblanks.h5p (Unlisted)" "heading" should exist And I click on "More" "button" And I should see "Make public" @@ -131,7 +131,7 @@ Feature: Make content public or unlisted And I click on "Upload" "link" And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Upload content" filemanager And I click on "Save changes" "button" - Then I should see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element" + Then "filltheblanks.h5p (Unlisted)" "heading" should exist @_file_upload Scenario: User preference concerning content visibility overrides site-wide default content visibility @@ -149,5 +149,5 @@ Feature: Make content public or unlisted And I click on "Upload" "link" And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Upload content" filemanager And I click on "Save changes" "button" - Then I should see "filltheblanks.h5p" in the "h2" "css_element" - And I should not see "filltheblanks.h5p (Unlisted)" in the "h2" "css_element" + Then "filltheblanks.h5p" "heading" should exist + And "filltheblanks.h5p (Unlisted)" "heading" should not exist