MDL-47494 ddwtos: Fix dd qtype Behat tests to not use the generic type step. #14895
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user