mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-55071-master-behat-fixes-is-back' of https://github.com/FMCorz/moodle
This commit is contained in:
commit
8793ebdd15
@ -140,7 +140,7 @@ XPATH
|
||||
.//*[contains(., %locator%) and not(.//*[contains(., %locator%)])]
|
||||
XPATH
|
||||
, 'form_row' => <<<XPATH
|
||||
.//label[contains(., %locator%)]/ancestor::*[contains(concat(' ', @class, ' '), ' fitem ')]
|
||||
.//*[self::label or self::div[contains(concat(' ', @class, ' '), ' fstaticlabel ')]][contains(., %locator%)]/ancestor::*[contains(concat(' ', @class, ' '), ' fitem ')]
|
||||
XPATH
|
||||
);
|
||||
|
||||
|
@ -50,7 +50,8 @@ class behat_action_menu extends behat_base {
|
||||
*/
|
||||
public function i_open_the_action_menu_in($element, $selectortype) {
|
||||
if (!$this->running_javascript()) {
|
||||
throw new DriverException('Open the action menu step is not available with Javascript disabled');
|
||||
// Action menus automatically expand in a visible list of actions when Javascript is disabled.
|
||||
return;
|
||||
}
|
||||
// Gets the node based on the requested selector type and locator.
|
||||
$node = $this->get_node_in_container("css_element", "[role=menuitem][aria-haspopup=true]", $selectortype, $element);
|
||||
|
@ -38,9 +38,6 @@ require_once(__DIR__ . '/../../../../lib/tests/behat/behat_action_menu.php');
|
||||
class behat_theme_boost_behat_action_menu extends behat_action_menu {
|
||||
|
||||
public function i_open_the_action_menu_in($element, $selectortype) {
|
||||
if (!$this->running_javascript()) {
|
||||
throw new DriverException('Open the action menu step is not available with Javascript disabled');
|
||||
}
|
||||
// Gets the node based on the requested selector type and locator.
|
||||
$node = $this->get_node_in_container("css_element", "[role=button][aria-haspopup=true]", $selectortype, $element);
|
||||
$this->ensure_node_is_visible($node);
|
||||
|
Loading…
x
Reference in New Issue
Block a user