Merge branch 'MDL-50055-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
David Monllao 2015-05-05 10:51:30 +08:00
commit 96ec51bdec
5 changed files with 26 additions and 17 deletions

View file

@ -383,4 +383,21 @@ class behat_forms extends behat_base {
$field->set_value($value);
}
/**
* Select a value from single select and redirect.
*
* @Given /^I select "(?P<singleselect_option_string>(?:[^"]|\\")*)" from the "(?P<singleselect_name_string>(?:[^"]|\\")*)" singleselect$/
*/
public function i_select_from_the_singleselect($option, $singleselect) {
$actions = array(
new Given('I set the field "' . $this->escape($singleselect) . '" to "' . $this->escape($option) . '"'),
);
if (!$this->running_javascript()) {
$actions[] = new Given('I press "' . get_string('go') . '"');
}
return $actions;
}
}