This is a huge performance improvement for behat.
The current set of steps loads the page
It then looks for the Classic/Clean version of the settings menu
If it fails to find it looks for the Boost Cog
Then it clicks the "Turn editing on" button
This can take a substantial period.
We do not actually need to run these steps as we are able to jump
straight to the URL. We already have access to the sesskey value
required to do this.
There is not loss in testing functionality because the actual testing of
the Turn editing functionality is tested in other places sufficiently.
Padding nested course categories by space to make them render in a tree
structure does not really make a lot of sense as they are already being
rendered as full paths. It's simpler to show them without the
indentation.
Given this, there's not much point keeping make_categories_options().
So it's better to deprecate this function and call
core_course_category::make_categories_list() directly instead.
Adds filtering on the completion criteria form to ensure we are only
selecting actual course instances of this type. Prior to this change
we would also get NULL values from unrelated criteria types.
The behat hooks were needlessly complicated which made them much harder
to read, and understand, leading to bugs during development.
These have been significantly simplified to favour clarity over
overloading.
The session was previously only started once, but has now been moved to
restart between each test. Because of this the `$session->start()` is
now called more frequently which exposes a pre-existing issue whereby
Selenium will periodically fail to start.
When the session was only started at the beginning of the test, and at
occasional other times, it made sense to always stop the test runner
because it signified an issue with obtaining the session at all.
Since the session is restarted more frequently, and now between every
test, it no longer makes sense to do this. The test should only be
_stopped_ if the first attempt to obtain the Session fails. Once a
Session has been retrieved at least once it no longer makes sense to
assume that the failure was a configuration failure, but a connection
failure. Therefore subsequent tests should be attempted.