diff --git a/lib/behat/form_field/behat_form_passwordunmask.php b/lib/behat/form_field/behat_form_passwordunmask.php index 824085eba20..aef507c02d1 100644 --- a/lib/behat/form_field/behat_form_passwordunmask.php +++ b/lib/behat/form_field/behat_form_passwordunmask.php @@ -63,6 +63,10 @@ JS; // Ensure all pending JS is finished. if ($this->running_javascript()) { + // Press enter key after setting password, so we have a stable page. + $this->field->keyDown(13); + $this->field->keyPress(13); + $this->field->keyUp(13); $this->session->wait(behat_base::TIMEOUT * 1000, behat_base::PAGE_READY_JS); } } diff --git a/mod/lesson/tests/behat/lesson_user_override.feature b/mod/lesson/tests/behat/lesson_user_override.feature index 197383ce05e..9313d950d63 100644 --- a/mod/lesson/tests/behat/lesson_user_override.feature +++ b/mod/lesson/tests/behat/lesson_user_override.feature @@ -134,7 +134,6 @@ Feature: Lesson user override And I set the following fields to these values: | Password protected lesson | Yes | | id_password | moodle_rules | - And I wait until the page is ready And I press "Save and display" And I navigate to "User overrides" in current page administration And I press "Add user override"