From e36e40f530bf2469c7dfdd80adfcbda8c8ec279f 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 | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/admin/tool/behat/tests/behat/tabs.feature b/admin/tool/behat/tests/behat/tabs.feature index 9ce2fa5e820..b0525066996 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 "No courses" 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 bbb098bf6dc..f4874c3eaaa 100644 --- a/lib/behat/classes/partial_named_selector.php +++ b/lib/behat/classes/partial_named_selector.php @@ -104,6 +104,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', @@ -205,6 +206,9 @@ XPATH XPATH , 'group_message_message_content' => << << <<