-
Improvement
-
Resolution: Fixed
-
Minor
-
3.2
-
MOODLE_32_STABLE
-
MOODLE_32_STABLE
-
MDL-55713-master-3 -
At the moment we have a set of Behat selector overrides, and these are used to find things like fields, links, buttons, etc.
Mink has it's own in-built fields, and we override some of these.
I'd argue that the way we're doing it is currently slightly incorrect as we take the core Mink PartialNamedSelector and we add additional xpaths to it.
I believe we'd be better off by creating a new class extending PartialNamedSelector, and replacing the core one with it.
This offers us several benefits:
- we can register custom Moodle field types as actual fields - this means that things like find_field will be able to pick up field types such as the filemanager. At the moment we do not have the ability to do this so we call find_field, and when that times out, we call find_filemanager.
- we can make use of the replacements system build into the NamedSelector system