From 48dc7ef01e5b05eb735ede291641771fe313847f Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Fri, 25 Nov 2022 22:03:00 +0100 Subject: [PATCH 1/2] MDL-76490 behat: correct step for opening autocomplete in container. --- lib/tests/behat/behat_forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php index 2e60f1ce073..fc7b7e5b3f6 100644 --- a/lib/tests/behat/behat_forms.php +++ b/lib/tests/behat/behat_forms.php @@ -718,7 +718,7 @@ class behat_forms extends behat_base { public function i_open_the_autocomplete_suggestions_list($container = null, $containertype = null) { $csstarget = ".form-autocomplete-downarrow"; if ($container && $containertype) { - $this->execute('behat_general::i_click_on', [$csstarget, 'css_element', $container, $containertype]); + $this->execute('behat_general::i_click_on_in_the', [$csstarget, 'css_element', $container, $containertype]); } else { $this->execute('behat_general::i_click_on', [$csstarget, 'css_element']); } From 8db1cdf4628a3337f82bc6fcc219b400f0a4f977 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 5 Dec 2022 14:02:33 +0000 Subject: [PATCH 2/2] MDL-76490 behat: use defined step for interaction with autocomplete. --- enrol/tests/behat/add_to_group.feature | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/enrol/tests/behat/add_to_group.feature b/enrol/tests/behat/add_to_group.feature index 269f5c66935..8ece9defe0f 100644 --- a/enrol/tests/behat/add_to_group.feature +++ b/enrol/tests/behat/add_to_group.feature @@ -28,9 +28,8 @@ Feature: Users can be added to multiple groups at once And I am on "Course 1" course homepage And I follow "Participants" And I click on "Edit groups for \"Student 1\"" "link" in the "student1" "table_row" - And I click on ".form-autocomplete-downarrow" "css_element" in the "student1" "table_row" + And I open the autocomplete suggestions list in the "student1" "table_row" And I click on "Group 1" item in the autocomplete list - And I click on ".form-autocomplete-downarrow" "css_element" in the "student1" "table_row" And I click on "Group 2" item in the autocomplete list And I press the escape key And I click on "Save changes" "link" in the "student1" "table_row"