This option (--skip-passed) was implemented because of some bugs in the initial
versions of Behat 3 with the --rerun option.
After Behat 3.2.0 those bugs were fixed and we switched back to use
the upstream --rerun option, abandoning --skip-passed.
More yet, this option wasn't ever documented much, neither in docs or cli.
So it's time to remove it, one less thing to maintain for nothing.
Note that this commit is a 99.99% revert of the original one that was
applied to the moodle-behat-extension (now in core):
https://github.com/moodlehq/moodle-behat-extension/commit/c4b25158d212509b
From Selenium 4.8.0, support for non-w3c browser control has ended.
We only use W3C browser control these days, and this was missed as part
of the move to W3C. All browser options must be vendor-prefixed.
Right now, any E_DEPRECATED, E_USER_DEPRECATED error type leads
to exception in behat runs, because the behat error handled is
not aware of them. See MDL-38041 for the initial implementation.
We don't want that to happen and they must behave like other "low"
error types (notices, warnings...), that will be reported in logs
or output, but won't trigger any exception, so the test can continue.
This commit just adds those 2 "new" error types to the handler,
providing the very same behaviour for them than the rest.
PHP before version 8.1 automatically converted to int if the function
parameter (or array key) is expected to be int. PHP 8.1 shows notice in
this case
This will find all data generators that can be used in behat via the
'the following "something" exist:' step, and display them in a select
list on the step definitions page.
When a generator is selected, it will fetch the required fields for that
generator and display them on the page.
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
These steps have accepted a NodeElement instance as an argument for some
time, but were trying to cast it to string when formulating exception
messages, making it harder to debug and, in the case of the 'should see'
step, not work at all.
This patch introduces a new function to produce a consistent naming for
them.
This commit adds new steps related to action menus to support:
* Choosing an item in a named action menu
* Choosing an item in a named action menu within a container
* Confirming that an action menu item does or does not exist in a named
action menu
* Confirming that an action menu item does or does not exist in a named
action menu within a container
The existing action menu steps were insufficient as they assume that
there is only one action menu within he container, which is not
necessarily the case.
The existing action menu steps are not non-JS friendly and will error if
JS is disabled, without providing any fallback when one is easily
available.
Unfortunately these steps cannot be used to replace the existing steps
without manual intervention.
Some editors do not immediately store their content to the textarea they
represent and only do so when the form is submitted or they are
requested to.
This change adds to the existing API to allow an (optional)
`store_current_value` function to be defined for the editor type so that
it can use the JavaScript API to persist any current content to the
editor.
This commit adds a standardise_html function and updates the matches
function to compare normalised content.
This allows for a wider variety of valid editor output to be handled
using the standard value matching steps in Behat, thus supporting
editors other than Atto better.
Prior to this commit, the behat_form_editor integration was hard-coded
to use Atto.
This change allows other editors to be used to set editor values, and
breaks that hard bond. Following this change, any editor is able to
define a behat_editor_[name].php file defining a function which meets
the following signature:
set_editor_value(string $editorid, string $value): void
Each editor is responsible for checking whether its own API is available
and calling any relevant functions to force the editor to set the
content.
Please note: Behat is unable to determine the current editor in use on
the page automatically.
This change, which should be easy to mimic for other editors.
This will ensure that the correct editor is used for tests relating to
that editor, or its subplugins.
Adds behat support for group structures in the select menu field. When
looking for a particular option you can further specify the group under
which this option should be located by using the '>' delimiter
(e.g. "Group name > Option name"). In addition to that, this commit
intorduces new step definition which can be used to check whether the
select menu field contains a particular option.
This commit introduces a new partial selector for select_menu fields,
and teaching the field manager how to recognise these, then introducing
a new field type which can handle setting values for this field.