From d9e35bd12379ccb019eaaca28c971e4f2bb2f219 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 2 Jul 2024 13:15:46 +0800 Subject: [PATCH] MDL-82373 mod_lesson: Fix failing behat tests for Selenium 4 Recent versions of Chrome do not re-render the page but return previous page state from cache. The page state had the Submit button disabled before navigating away. Refreshing the page addresses this. --- mod/lesson/tests/behat/lesson_question_attempts.feature | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/lesson/tests/behat/lesson_question_attempts.feature b/mod/lesson/tests/behat/lesson_question_attempts.feature index 110f626a9b7..19ab1b8df4b 100644 --- a/mod/lesson/tests/behat/lesson_question_attempts.feature +++ b/mod/lesson/tests/behat/lesson_question_attempts.feature @@ -96,6 +96,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than And I press the "back" button in the browser And I press the "back" button in the browser And I press the "back" button in the browser + And I reload the page And I should see "Paper is made from trees" And I set the following fields to these values: | True | 1 | @@ -117,6 +118,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than And I press "Submit" And I should see "Wrong" And I press the "back" button in the browser + And I reload the page And I set the following fields to these values: | True | 1 | When I press "Submit" @@ -141,6 +143,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than And I press "Submit" And I should see "Correct" And I press the "back" button in the browser + And I reload the page And I set the following fields to these values: | False | 1 | And I press "Submit"