-
Bug
-
Resolution: Fixed
-
Minor
-
3.8.1
-
MOODLE_38_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MDL-67740-master-behatstepsfilter -
Steps to reproduce
- Log in as admin
- Go to Site administration > Development > Acceptance testing
- Set the "Contains" field to "I should see"
Expected behaviour: All Behat steps that contain the "I should see" as a substring should be listed
Actual behaviour: "There aren't any step definitions matching this filter" is shown
Reasons
The admin/tool/behat/index.php uses PARAM_ALPHANUMEXT as a type for this field, effectively disallowing anything but single simple words to be searched for, which significantly decreases the usefulness of this page. The official documentation http://behat.org/en/latest/user_guide/command_line_tool/informative_output.html does not explicitly mention it, but it seems to support multiple words phrase quite well:
$ vendor/bin/behat --config=/path/to/behat.yml -d 'I should see'
|
From what I can see, it does not perform an exact match - it returns also 'I should not see' steps. But I am finding that actually useful behaviour.
Other notes
While looking at this page, I can see some further space for improvements:
- The results displayed in 50% narrow column for no good reason
- The "Info" section occupying a lot of valuable screen space with a static information not relevant for returning experienced developers
- Overall styling improvements would be nice.