mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-52970 behat: For single select only click event is enough
This commit is contained in:
parent
e8ef0e4f63
commit
f7a73e196e
@ -89,8 +89,15 @@ class behat_form_select extends behat_form_field {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// This is a single select, let's pass the last one specified.
|
||||
$this->field->selectOption(end($options));
|
||||
|
||||
// If not running JS or not a singleselect then use selectOption.
|
||||
// For singleselect only click event is enough.
|
||||
if (!$this->running_javascript() ||
|
||||
!($this->field->hasClass('singleselect') || $this->field->hasClass('urlselect'))) {
|
||||
|
||||
// This is a single select, let's pass the last one specified.
|
||||
$this->field->selectOption(end($options));
|
||||
}
|
||||
}
|
||||
|
||||
// With JS disabled this is enough and we finish here.
|
||||
|
Loading…
x
Reference in New Issue
Block a user