mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
Merge branch 'MDL-50055-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
96ec51bdec
5 changed files with 26 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue