Affects Version/s: 3.8
Component/s: Automated functional tests (behat)
We have partial and exact named selectors in core.
These are defined in lib/behat/classes/*_named_selector.php and are essentially a mapping of human-readable things, to xpath replacements.
We use these quite a bit (as we should) to make things understandable.
For example, we have one to translate the "dialogue" xpath so that, instead of writing:
We can instead write:
We have several of these already, and we're beginning to see component-specific ones being introduced. For example, messaging introduced a number of selectors relating to group messaging.
I feel that we need to make it possible for components to do this.
This will allow much clearer steps and better re-use of existing step definitinos.
For example, it will be easy to write a named selector for "Discussion" and use all existing steps (And "Name your hobby" "mod_forum > Discussion" should exist")