diff --git a/admin/tool/behat/tests/behat/basic_actions.feature b/admin/tool/behat/tests/behat/basic_actions.feature index 364b54e6bf3..9604b0bb725 100644 --- a/admin/tool/behat/tests/behat/basic_actions.feature +++ b/admin/tool/behat/tests/behat/basic_actions.feature @@ -18,12 +18,12 @@ Feature: Page contents assertions When I follow "Overview" And I wait until the page is ready And I wait "2" seconds - And I hover ".region-content .generaltable td span" "css_element" + And I hover "#region-main .generaltable td span" "css_element" Then I should see "I'm the description" And I should see "Filter groups by" And I should not see "Filter groupssss by" - And I should see "Group members" in the ".region-content table th.c1" "css_element" - And I should not see "Group membersssss" in the ".region-content table th.c1" "css_element" + And I should see "Group members" in the "#region-main table th.c1" "css_element" + And I should not see "Group membersssss" in the "#region-main table th.c1" "css_element" And I follow "Groups" And the "#groupeditform #showcreateorphangroupform" "css_element" should be enabled And the "#groupeditform #showeditgroupsettingsform" "css_element" should be disabled diff --git a/admin/tool/behat/tests/behat/manipulate_forms.feature b/admin/tool/behat/tests/behat/manipulate_forms.feature index 2b9ed4620d2..ec58a753b4e 100644 --- a/admin/tool/behat/tests/behat/manipulate_forms.feature +++ b/admin/tool/behat/tests/behat/manipulate_forms.feature @@ -32,5 +32,5 @@ Feature: Forms manipulation Then I should see "Close the quiz" And I should see "Group mode" And I should see "Grouping" - And I should not see "Show more..." in the "region-main-box" "region" + And I should not see "Show more..." in the "region-main" "region" And I should see "Show less..." diff --git a/blocks/tests/behat/configure_block_throughout_site.feature b/blocks/tests/behat/configure_block_throughout_site.feature index e0070185a79..0eabb379bd2 100644 --- a/blocks/tests/behat/configure_block_throughout_site.feature +++ b/blocks/tests/behat/configure_block_throughout_site.feature @@ -32,4 +32,4 @@ Feature: Add and configure blocks throughout the site And I press "Save changes" And I follow "Course 1" # The first block matching the pattern should be top-left block - And I should see "Comments" in the "//*[@id='region-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element" + And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element" diff --git a/blocks/tests/behat/manage_blocks.feature b/blocks/tests/behat/manage_blocks.feature index 2c3cb7f2cd1..e671a313eaf 100644 --- a/blocks/tests/behat/manage_blocks.feature +++ b/blocks/tests/behat/manage_blocks.feature @@ -77,4 +77,4 @@ Feature: Block appearances | Visible | Yes | | Region | Right | And I press "Save changes" - And I should see "Comments" in the "#region-post" "css_element" + And I should see "Comments" in the "//*[@id='region-post' or @id='block-region-side-post']" "xpath_element" diff --git a/course/tests/behat/course_controls.feature b/course/tests/behat/course_controls.feature index 371fa37ea91..a5acab16968 100644 --- a/course/tests/behat/course_controls.feature +++ b/course/tests/behat/course_controls.feature @@ -134,7 +134,7 @@ Feature: Course activity controls works as expected And "#section-2" "css_element" exists And I delete "Test forum name 1" activity And "#section-2" "css_element" exists - And I should not see "Test forum name 1" in the ".region-content" "css_element" + And I should not see "Test forum name 1" in the "#region-main" "css_element" And I duplicate "Test forum name 2" activity editing the new copy with: | Forum name | Edited test forum name 2 | And "#section-2" "css_element" exists diff --git a/lib/behat/classes/behat_selectors.php b/lib/behat/classes/behat_selectors.php index e92131de93b..b0153d924cb 100644 --- a/lib/behat/classes/behat_selectors.php +++ b/lib/behat/classes/behat_selectors.php @@ -89,7 +89,7 @@ XPATH .//div[contains(concat(' ', normalize-space(@class), ' '), concat(' ', %locator%, ' '))] | .//div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]/descendant::h2[normalize-space(.) = %locator%]/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' block ')] XPATH , 'region' => << <<