From aff86afaff223a03d44e91a6a4b0d32fc4518a84 Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Wed, 17 Nov 2021 12:35:06 +0100 Subject: [PATCH] MDL-72250 core_course: behat fix for targeting close button --- course/format/tests/behat/courseindex_keyboardnav.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/format/tests/behat/courseindex_keyboardnav.feature b/course/format/tests/behat/courseindex_keyboardnav.feature index 34a5d400636..46d746a3b02 100644 --- a/course/format/tests/behat/courseindex_keyboardnav.feature +++ b/course/format/tests/behat/courseindex_keyboardnav.feature @@ -20,14 +20,14 @@ Feature: Verify that courseindex is usable with the keyboard And I click on "Side panel" "button" And I click on "Open course index drawer" "button" And I should see "Topic 1" in the "courseindex-content" "region" - And the focused element is ".drawertoggle" "css_element" + And the focused element is "[data-preference='drawer-open-index'] .drawertoggle" "css_element" And I press the tab key Then the focused element is ".courseindex-section" "css_element" @javascript Scenario: General focus on open course index. When I press the shift tab key - And the focused element is ".drawertoggle" "css_element" + And the focused element is "[data-preference='drawer-open-index'] .drawertoggle" "css_element" And I press enter Then I should not see "Topic 1" in the "courseindex-content" "region"