From 437738f488df452f4316d50c292efcefd1e2b991 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 6 Feb 2024 16:56:25 +0000 Subject: [PATCH] MDL-75081 behat: define new `heading` named selector. Co-authored-by: Jun Pataleta --- admin/tool/behat/tests/behat/tabs.feature | 6 +++--- lib/behat/classes/partial_named_selector.php | 4 ++++ lib/upgrade.txt | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/tool/behat/tests/behat/tabs.feature b/admin/tool/behat/tests/behat/tabs.feature index 0fe38b3a784..308af83cb22 100644 --- a/admin/tool/behat/tests/behat/tabs.feature +++ b/admin/tool/behat/tests/behat/tabs.feature @@ -27,8 +27,8 @@ Feature: Confirm that we can open multiple browser tabs # Switch between all the tabs and confirm their different contents. Then I should see "You're not enrolled in any course" And I switch to "CourseViewer2" tab - And I should see "Course 3" in the "h1" "css_element" + And "Course 3" "heading" should exist And I switch to "CourseViewer1" tab - And I should see "Course 2" in the "h1" "css_element" + And "Course 2" "heading" should exist And I switch to the main tab - And I should see "Course 1" in the "h1" "css_element" + And "Course 1" "heading" should exist diff --git a/lib/behat/classes/partial_named_selector.php b/lib/behat/classes/partial_named_selector.php index 039293f293a..98ab02f6e82 100644 --- a/lib/behat/classes/partial_named_selector.php +++ b/lib/behat/classes/partial_named_selector.php @@ -108,6 +108,7 @@ class behat_partial_named_selector extends \Behat\Mink\Selector\PartialNamedSele 'group_message_tab' => 'group_message_tab', 'group_message_list_area' => 'group_message_list_area', 'group_message_message_content' => 'group_message_message_content', + 'heading' => 'heading', 'icon_container' => 'icon_container', 'icon' => 'icon', 'link' => 'link', @@ -232,6 +233,9 @@ XPATH XPATH , 'group_message_message_content' => << << <<