MDL-47494 ddwtos: Fix dd qtype Behat tests to not use the generic type step. #14895

This commit is contained in:
Tim Hunt
2015-02-20 13:47:10 +00:00
parent ee859c3fc6
commit ad0e615ea7
@@ -76,7 +76,12 @@ class behat_qtype_ddwtos extends behat_base {
* @Given /^I type "(?P<keys>[^"]*)" into space "(?P<space_number>\d+)" in the drag and drop onto image question$/
*/
public function i_type_into_space_in_the_drag_and_drop_into_text_question($keys, $spacenumber) {
$generalcontext = behat_context_helper::get('behat_general');
$generalcontext->i_type_into_the($keys, $this->drop_xpath($spacenumber), 'xpath_element');
$node = $this->get_selected_node('xpath_element', $this->drop_xpath($spacenumber));
$this->ensure_node_is_visible($node);
foreach (str_split($keys) as $key) {
$node->keyDown($key);
$node->keyPress($key);
$node->keyUp($key);
}
}
}