mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-46891 behat: Phantomjs require explicit change event
It fails with multiple select while selecting group
This commit is contained in:
parent
0f3fba7d66
commit
afccc03f14
@ -62,6 +62,11 @@ class behat_groups extends behat_base {
|
||||
$fulloption = $groupoption->getText();
|
||||
$select->selectOption($fulloption);
|
||||
|
||||
// This is needed by some drivers to ensure relevant event is triggred and button is enabled.
|
||||
$script = "Syn.trigger('change', {}, {{ELEMENT}})";
|
||||
$this->getSession()->getDriver()->triggerSynScript($select->getXpath(), $script);
|
||||
$this->getSession()->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
|
||||
|
||||
// Here we don't need to wait for the AJAX response.
|
||||
$this->find_button(get_string('adduserstogroup', 'group'))->click();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user