mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-47410 behat: Perform exact match for date_time selectors
This commit is contained in:
parent
46fd92b938
commit
708ae8aa0f
@ -268,7 +268,7 @@ XPATH
|
||||
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
|
||||
],
|
||||
];
|
||||
@ -287,6 +287,12 @@ XPATH
|
||||
'%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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user