From 740c2e80d840c97ef3c378dfc8d19f764f930254 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Fri, 26 Jun 2020 13:18:38 +0800 Subject: [PATCH] MDL-66979 behat: Use tab to blur current focus The focus should be on something, rather than removed. The way in which focus removal works can lead to side effects. --- enrol/tests/behat/behat_enrol.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enrol/tests/behat/behat_enrol.php b/enrol/tests/behat/behat_enrol.php index bd48efcbb09..872a8aabf0f 100644 --- a/enrol/tests/behat/behat_enrol.php +++ b/enrol/tests/behat/behat_enrol.php @@ -66,7 +66,7 @@ class behat_enrol extends behat_base { // Ensure we get button in focus, before pressing button. if ($this->running_javascript()) { - $this->execute("behat_general::i_take_focus_off_field", array(get_string('addinstance', 'enrol'), "button")); + $this->execute('behat_general::i_press_named_key', ['', 'tab']); } // Save changes.