mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-43394 behat: Fix checkbox action
This commit is contained in:
parent
edd9bb451c
commit
832530e2eb
@ -47,6 +47,11 @@ class behat_form_checkbox extends behat_form_field {
|
||||
*/
|
||||
public function set_value($value) {
|
||||
|
||||
if (!$this->running_javascript()) {
|
||||
$this->field->check();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!empty($value) && !$this->field->isChecked()) {
|
||||
// Check it if it should be checked and it is not.
|
||||
$this->field->click();
|
||||
|
Loading…
x
Reference in New Issue
Block a user