MDL-87443 behat: define new Toast message named selector.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
issueNumber: MDL-87443
|
||||
notes:
|
||||
core:
|
||||
- message: >-
|
||||
There is a new Behat `toast_message` named selector to more easily
|
||||
assert the presence of Toast messages on the page
|
||||
type: improved
|
||||
@@ -127,6 +127,7 @@ class behat_partial_named_selector extends \Behat\Mink\Selector\PartialNamedSele
|
||||
'table' => 'table',
|
||||
'table_row' => 'table_row',
|
||||
'text' => 'text',
|
||||
'toast_message' => 'toast_message',
|
||||
'xpath_element' => 'xpath_element',
|
||||
'form_row' => 'form_row',
|
||||
'autocomplete_selection' => 'autocomplete_selection',
|
||||
@@ -279,6 +280,9 @@ XPATH
|
||||
XPATH
|
||||
, 'text' => <<<XPATH
|
||||
.//*[contains(., %locator%) and not(.//*[contains(., %locator%)])]
|
||||
XPATH
|
||||
, 'toast_message' => <<<XPATH
|
||||
.//*[contains(concat(' ', normalize-space(@class), ' '), ' toast-message ') and %exactTagTextMatch%]
|
||||
XPATH
|
||||
, 'form_row' => <<<XPATH
|
||||
.//*[contains(concat(' ', @class, ' '), ' col-form-label ')]
|
||||
|
||||
Reference in New Issue
Block a user