Skip to content

Commit

Permalink
Merge branch 'MDL-47410-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Feb 18, 2021
2 parents 7d5b808 + 708ae8a commit 28dadc2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/behat/classes/partial_named_selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function __construct() {
XPATH
,
'date_time' => <<<XPATH
.//fieldset[(%idMatch% or ./legend[%tagTextMatch%]) and (@data-fieldtype='date' or @data-fieldtype='date_time')]
.//fieldset[(%idMatch% or ./legend[%exactTagTextMatch%]) and (@data-fieldtype='date' or @data-fieldtype='date_time')]
XPATH
],
];
Expand All @@ -288,6 +288,12 @@ public function __construct() {
'%ariaLabelMatch%' => [
'moodle' => 'contains(./@aria-label, %locator%)',
],
'%exactTagTextMatch%' => [
// This is based upon the upstream tagTextMatch but performs an exact match rather than a loose match using
// contains().
// If possible we should only use exact matches for any new form fields that we add.
'moodle' => 'normalize-space(text())=%locator%',
],
];

/** @var List of deprecated selectors */
Expand Down

0 comments on commit 28dadc2

Please sign in to comment.