It was deprecated in php72 and now it's gone.
Have used this regexp to find all the uses in core:
ag set_error_handler | uniq
And then checked all them manually, that parameter was not
being used in the 3 methods where we are removing it.
Adds behat support for selecting date and time from a datetime selector
element. The passed values should represent a textual date and time
description wrapped in '##' (e.g. '##first day of January 2020 08:00##',
'##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be
used to disable the datetime selector element.
Adds behat support for selecting a date from the date selector element.
The passed values should represent a textual date description wrapped
in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also,
the value 'disabled' is valid and can be used to disable the date
selector element.
Moves the logic from guess_type() to a separate protected method
get_field_instance_for_element(). This would be quite useful for
form field classes as they can now use this method when there is
a need to determine the type of a given node element.
Behat should not trigger Synthetic browser events. It is incorrect to do
so as the UI should be used to trigger events correctly.
The W3C WebDriver specification explicitly states when and where these
events will be triggered from (the browser) and therefore there is no
ambiguity and no need to synthetically trigger them from Behat.
This change introduces a new function to execute Javascript directly on
a node.
This should not, ordinarily, be used directly by steps, but may be
required in other parts of the Behat interaction.
The PHP WebDriver Mink Driver does not necessarily require Selenium. It
supports Selenium 3 upwards, and can be used directly with ChromeDriver,
EdgeDriver, SafariDriver, GeckoDriver, and others.
It therefore uses a slightly different configuraitno path.
This commit updates core Behat features to make use of the
php-webdriver/webdriver library instead of the legacy Instaclick
library.
Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.
The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
This commit promotes the Inplace Editable field to a first-class form
element by introducing a new partial selector for inplace editable
fields, and teaching the field manager how to recognise these, then
introducing a new field type which can handle setting values for this
field.
Behat form fields are implemented in a way completely isolated from the
rest of the Behat Context system. Whereas regular step definitions have
access to execute steps, to call `find`, check for JS running, and other
related functionality, the Moodle implementation of a field type does
not have any access to this.
By moving the core functionality of behat_base to a new trait, and the
constants to a new interface, the functionality can also be used in
behat form fields in the same way as elsewhere.
This is similar to change made in MDL-69136 to allow an already-fetched
NodeElement to be provided to the get_node_in_container() function and
makes it easier to be deterministic when writing steps.
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.