From 838cf06c1429bda0edbea12d189c87f46231968a Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Mon, 15 Sep 2025 19:16:57 +0800 Subject: [PATCH] MDL-86488 behat: Click on the menu button itself, not the icon --- public/blocks/accessreview/tests/accessreview.feature | 4 ++-- public/blocks/accessreview/tests/behat/accessreview.feature | 4 ++-- .../imagegallery/tests/behat/imagegallery_preset.feature | 6 +++--- .../data/preset/journal/tests/behat/journal_preset.feature | 6 +++--- .../preset/proposals/tests/behat/proposals_preset.feature | 6 +++--- .../preset/resources/tests/behat/resources_preset.feature | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/public/blocks/accessreview/tests/accessreview.feature b/public/blocks/accessreview/tests/accessreview.feature index 8f1f2371ed8..4adc163c0df 100644 --- a/public/blocks/accessreview/tests/accessreview.feature +++ b/public/blocks/accessreview/tests/accessreview.feature @@ -22,9 +22,9 @@ Feature: Block accessreview When I add the "Accessibility Review" block Then I should see "Accessibility Review" And I should see "Your accessibility toolkit needs to be registered." - And I click on "Actions menu" "icon" in the "Accessibility Review" "block" + And I click on "Actions menu" "menuitem" in the "Accessibility Review" "block" And I follow "Hide Accessibility Review block" And I should not see "Your accessibility toolkit needs to be registered." - And I click on "Actions menu" "icon" in the "Accessibility Review" "block" + And I click on "Actions menu" "menuitem" in the "Accessibility Review" "block" And I follow "Show Accessibility Review block" And I should see "Your accessibility toolkit needs to be registered." diff --git a/public/blocks/accessreview/tests/behat/accessreview.feature b/public/blocks/accessreview/tests/behat/accessreview.feature index c56a5ec178d..090620e0f85 100644 --- a/public/blocks/accessreview/tests/behat/accessreview.feature +++ b/public/blocks/accessreview/tests/behat/accessreview.feature @@ -24,9 +24,9 @@ Feature: Block accessreview When I add the "Accessibility review" block Then I should see "Accessibility review" And I should see "Your accessibility toolkit needs to be registered." - And I click on "Actions menu" "icon" in the "Accessibility review" "block" + And I click on "Actions menu" "menuitem" in the "Accessibility review" "block" And I follow "Hide Accessibility review block" And I should not see "Your accessibility toolkit needs to be registered." - And I click on "Actions menu" "icon" in the "Accessibility review" "block" + And I click on "Actions menu" "menuitem" in the "Accessibility review" "block" And I follow "Show Accessibility review block" And I should see "Your accessibility toolkit needs to be registered." diff --git a/public/mod/data/preset/imagegallery/tests/behat/imagegallery_preset.feature b/public/mod/data/preset/imagegallery/tests/behat/imagegallery_preset.feature index c5d0816fad3..471d7013f10 100644 --- a/public/mod/data/preset/imagegallery/tests/behat/imagegallery_preset.feature +++ b/public/mod/data/preset/imagegallery/tests/behat/imagegallery_preset.feature @@ -36,7 +36,7 @@ Feature: Users can use the Image gallery preset And I should not see "first.png" And I should not see "Alice Student" in the "#imagegallery-list" "css_element" And "//a/child::img[contains(@src, 'first.png')]" "xpath_element" should exist - And "Actions" "icon" should exist in the "#imagegallery-list" "css_element" + And "Actions" "button" should exist in the "#imagegallery-list" "css_element" And I should see "Second image" And I should not see "And this is the description text for image 2" And I should not see "second.png" @@ -48,7 +48,7 @@ Feature: Users can use the Image gallery preset And I should see "Alice Student" in the ".imagegallery-single" "css_element" And I should see "This is the description text for image 1" And "//a/child::img[contains(@src, 'first.png')]" "xpath_element" should exist - And "Actions" "icon" should exist in the ".imagegallery-single" "css_element" + And "Actions" "button" should exist in the ".imagegallery-single" "css_element" And I should not see "Second image" And I should not see "And this is the description text for image 2" And I should not see "Pau Teacher" @@ -59,7 +59,7 @@ Feature: Users can use the Image gallery preset And I should see "And this is the description text for image 2" And "//a/child::img[contains(@src, 'second.png')]" "xpath_element" should exist # This student can't edit or delete this entry, so the Actions menu shouldn't be displayed. - And "Actions" "icon" should not exist in the ".imagegallery-single" "css_element" + And "Actions" "button" should not exist in the ".imagegallery-single" "css_element" And I should not see "First image" And I should not see "Alice Student" in the ".imagegallery-single" "css_element" And I should not see "This is the description text for image 1" diff --git a/public/mod/data/preset/journal/tests/behat/journal_preset.feature b/public/mod/data/preset/journal/tests/behat/journal_preset.feature index d8f03ca1ad1..3013aebac77 100644 --- a/public/mod/data/preset/journal/tests/behat/journal_preset.feature +++ b/public/mod/data/preset/journal/tests/behat/journal_preset.feature @@ -33,21 +33,21 @@ Feature: Users can use the Journal preset When I am on the "Student reflections" "data activity" page logged in as student1 Then I should see "Reflection created by student" And I should see "This is the content for the entry 1" - And "Actions" "icon" should exist in the "#journal-list" "css_element" + And "Actions" "button" should exist in the "#journal-list" "css_element" And I should see "Reflection created by teacher" And I should see "And this is the content for the entry 2" # Single view. And I select "Single view" from the "jump" singleselect And I should see "Reflection created by student" And I should see "This is the content for the entry 1" - And "Actions" "icon" should exist in the ".journal-single" "css_element" + And "Actions" "button" should exist in the ".journal-single" "css_element" And I should not see "Reflection created by teacher" And I should not see "And this is the content for the entry 2" And I follow "Next" And I should see "Reflection created by teacher" And I should see "And this is the content for the entry 2" # This student can't edit or delete this entry, so the Actions menu shouldn't be displayed. - And "Actions" "icon" should not exist in the ".journal-single" "css_element" + And "Actions" "button" should not exist in the ".journal-single" "css_element" And I should not see "Reflection created by student" And I should not see "This is the content for the entry 1" diff --git a/public/mod/data/preset/proposals/tests/behat/proposals_preset.feature b/public/mod/data/preset/proposals/tests/behat/proposals_preset.feature index 7deb633da53..ca6de0b16f7 100644 --- a/public/mod/data/preset/proposals/tests/behat/proposals_preset.feature +++ b/public/mod/data/preset/proposals/tests/behat/proposals_preset.feature @@ -33,7 +33,7 @@ Feature: Users can use the Proposals preset When I am on the "Student projects" "data activity" page logged in as student1 Then I should see "Project created by student" And "Summary 1" "text" should exist - And "Actions" "icon" should exist in the "#proposals-list" "css_element" + And "Actions" "button" should exist in the "#proposals-list" "css_element" And I should see "Project created by teacher" And "Summary 2" "text" should exist And I click on "Project created by student" "link" @@ -48,7 +48,7 @@ Feature: Users can use the Proposals preset And I should see "Summary 1" And I should see "Content for entry 1" And I should see "Pending" - And "Actions" "icon" should exist in the ".proposals-single" "css_element" + And "Actions" "button" should exist in the ".proposals-single" "css_element" And I should not see "Project created by teacher" And I should not see "Summary 2" And I should not see "And content for entry 2" @@ -59,7 +59,7 @@ Feature: Users can use the Proposals preset And I should see "And content for entry 2" And I should see "Rejected" # This student can't edit or delete this entry, so the Actions menu shouldn't be displayed. - And "Actions" "icon" should not exist in the ".proposals-single" "css_element" + And "Actions" "button" should not exist in the ".proposals-single" "css_element" And I should not see "Project created by student" And I should not see "Summary 1" And I should not see "Content for entry 1" diff --git a/public/mod/data/preset/resources/tests/behat/resources_preset.feature b/public/mod/data/preset/resources/tests/behat/resources_preset.feature index 6b53cbf6706..5aed5cb8bb5 100644 --- a/public/mod/data/preset/resources/tests/behat/resources_preset.feature +++ b/public/mod/data/preset/resources/tests/behat/resources_preset.feature @@ -36,7 +36,7 @@ Feature: Users can use the Resources preset And I should see "The book author" And I should see "http://myfavouritebook.cat" And I should not see "Book content" - And "Actions" "icon" should exist in the "#resources-list" "css_element" + And "Actions" "button" should exist in the "#resources-list" "css_element" And I should see "My favourite podcast" And I should see "Type2" And I should see "The podcast author" @@ -49,7 +49,7 @@ Feature: Users can use the Resources preset And I should see "The book author" And I should see "http://myfavouritebook.cat" And I should see "Book content" - And "Actions" "icon" should exist in the ".resources-single" "css_element" + And "Actions" "button" should exist in the ".resources-single" "css_element" And I should not see "My favourite podcast" And I should not see "Type2" And I should not see "The podcast author" @@ -62,7 +62,7 @@ Feature: Users can use the Resources preset And I should see "http://myfavouritepodcast.cat" And I should see "Podcast content" # This student can't edit or delete this entry, so the Actions menu shouldn't be displayed. - And "Actions" "icon" should not exist in the ".resources-single" "css_element" + And "Actions" "button" should not exist in the ".resources-single" "css_element" And I should not see "My favourite book" And I should not see "Type1" And I should not see "The book author"