Permalink
Browse files

MDL-43394 behat: Fix checkbox action

  • Loading branch information...
1 parent 5d2169e commit a6cf46f473208ddd68c85daf2bd64d97c70fb68b @srynot4sale srynot4sale committed Dec 16, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/behat/form_field/behat_form_checkbox.php
@@ -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();

0 comments on commit a6cf46f

Please sign in to comment.