MDL-76010 behat: Move feature to use attempts generator
commite3494411304c99fb77728a1eba2fe1ec4d863664
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 16 Oct 2022 21:02:06 +0000 (16 23:02 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 18 Oct 2022 12:27:53 +0000 (18 14:27 +0200)
treecabdeb990a0fbd6cd4436e89d322df67f6771905
parentf8d28e4ca6e4c32d68b3f31266cf18b1e87fa206
MDL-76010 behat: Move feature to use attempts generator

This moves away from manual attempts and uses the activity
attempts generator instead. Quicker and not exposed to the
problems with clicks, refreshes and missing attempts.

Note that there is a small change in the attempt generator
so, now, when a new attempt is created, if the activity has
tracking enabled, the final result / grades are recalculated.

That's the real behaviour when the activity settings are
changes in the edition form and it's natural to get them
recalculated without having to visit the form. Specifically,
this allows the 1st scenario to pass, because in that scenario
no changes to the form are being performed.

Also, little detail, amend a dupe scenario name.
mod/h5pactivity/tests/behat/grading_attempts.feature
mod/h5pactivity/tests/generator/lib.php