mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-54589 behat: Trigger change event after selecting option
After selecting option, some browsers need explicit change event
This commit is contained in:
parent
49619ce243
commit
3aaf98f62c
@ -71,10 +71,9 @@ class behat_form_select extends behat_form_field {
|
||||
// Wait for all the possible AJAX requests that have been
|
||||
// already triggered by selectOption() to be finished.
|
||||
if ($this->running_javascript()) {
|
||||
// Trigger change event as this is needed by some drivers (Phantomjs). Don't do it for
|
||||
// Trigger change event as this is needed by some drivers (Phantomjs, Mac-FF). Don't do it for
|
||||
// Singleselect as this will cause multiple event fire and lead to race-around condition.
|
||||
$browser = \Moodle\BehatExtension\Driver\MoodleSelenium2Driver::getBrowser();
|
||||
if (!$singleselect && ($browser == 'phantomjs')) {
|
||||
if (!$singleselect) {
|
||||
$script = "Syn.trigger('change', {}, {{ELEMENT}})";
|
||||
try {
|
||||
$this->session->getDriver()->triggerSynScript($this->field->getXpath(), $script);
|
||||
|
@ -40,6 +40,7 @@ Feature: In an assignment, teachers grade multiple students on one page
|
||||
And I follow "Test assignment name"
|
||||
And I follow "View all submissions"
|
||||
And I click on "Grade" "link" in the "Student 1" "table_row"
|
||||
And I wait until the page is ready
|
||||
And I press "Save changes"
|
||||
And I press "Ok"
|
||||
And I click on "Edit settings" "link"
|
||||
|
Loading…
x
Reference in New Issue
Block a user