MDL-68124 lesson: Fix random behat error with Oracle
commit9d19157b08e75026a7463e0f2cfa854188ca97d6
authorSara Arjona <sara@moodle.com>
Fri, 15 Dec 2023 15:35:27 +0000 (15 16:35 +0100)
committerSara Arjona <sara@moodle.com>
Mon, 18 Dec 2023 07:21:18 +0000 (18 08:21 +0100)
treeffe472f9c2c87e155d5b9e1bdfeacf7d7492be93
parent513f3b02c76e0321b3c57ca8014d3100b4da8d94
MDL-68124 lesson: Fix random behat error with Oracle

This random error was caused because when reviewing an attempt,
the first pageid to display is calculated based on the timeseen
field in the lesson_attempst table.
In Oracle, sometimes it returned the second pageid (because both
had the same timeseen), so which led to these random failures.

Apart from adding 1-second wait when the attempt is created (to
guarantee the first page is returned properly), a few more
improvements have been also made, like removing manual steps for
setting the lesson activity or adding some extra checks to
confirm the information displayed is expected.
mod/lesson/tests/behat/lesson_review.feature