Skip to content

Commit

Permalink
MDL-47410 behat: Create custom selector for the date and datetime fields
Browse files Browse the repository at this point in the history
Creates a custom field selector to locate the requested date or datetime
form fields.
  • Loading branch information
Mihail Geshoski committed Feb 11, 2021
1 parent 8844095 commit eb0e5a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/behat/classes/partial_named_selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ public function __construct() {
.//descendant::span[@data-inplaceeditable][descendant::a[%titleMatch%]]
XPATH
,
'date_time' => <<<XPATH
.//fieldset[(%idMatch% or ./legend[%tagTextMatch%]) and (@data-fieldtype='date' or @data-fieldtype='date_time')]
XPATH
],
];

Expand Down

0 comments on commit eb0e5a1

Please sign in to comment.