Commit Graph

11 Commits

Author SHA1 Message Date
Bas Brands 3ff1b83239 MDL-71610 core_behat: update edit mode steps 2021-09-29 09:25:36 +02:00
Ilya Tregubov 3420278c86 MDL-72262 behat: Make alias shorter to fix Oracle failures. 2021-08-02 08:24:59 +02:00
Andrew Nicols 950c7adb1c MDL-72179 behat: Add page resolver for activity names 2021-07-23 20:43:48 +08:00
Andrew Nicols 730d6cb94e MDL-72179 behat: Improve core page resolvers
This commit makes the following improvements to core page resolverss:
* allows for mixed case naming (course, Course, etc.)
* allows fields other than the idnumber to be specified:
** course: idnumber, shortname, fullname
** course category: idnumber, name

Whilst some of these fields are not unique, they will typically be
unique in most test scenarios. Where they are not then the idnumber
should be used in preference.
2021-07-23 20:28:10 +08:00
Andrew Nicols 64e7326649 MDL-71874 behat: Show warning when using add to section without js 2021-06-09 16:26:43 +08:00
Ferran Recio 201a37e6aa MDL-70909 behat: context freeze and not freeze steps 2021-04-22 15:50:55 +02:00
Andrew Nicols 793f131019 MDL-70734 behat: Increase the WebDriver Curl timeout 2021-01-31 18:21:41 +08:00
Andrew Nicols bead2a1d96 MDL-66979 behat: Add a step to set a timeout factor for a test 2021-01-29 14:15:24 +08:00
Andrew Nicols 041b75f00a MDL-66979 behat: Handle JS on elements better
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.
2021-01-22 14:52:10 +08:00
Andrew Nicols 50b9866e54 MDL-66979 behat: Core updates for W3C WebDriver
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.
2021-01-22 14:52:09 +08:00
Andrew Nicols 548da2ce97 MDL-67668 behat: Share behat_behat functionality with forms
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.
2020-11-23 09:01:19 +08:00