Skip to content

Commit

Permalink
MDL-47494 ddimageortext: Fix dd qtype Behat tests to not use the gene…
Browse files Browse the repository at this point in the history
…ric type step. #14895
  • Loading branch information
timhunt committed Feb 20, 2015
1 parent 682bf66 commit d804067
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ public function i_drag_to_place_in_the_drag_and_drop_onto_image_question($dragit
* @Given /^I type "(?P<keys>[^"]*)" on place "(?P<place_number>\d+)" in the drag and drop onto image question$/
*/
public function i_type_on_place_in_the_drag_and_drop_onto_image_question($keys, $placenumber) {
$generalcontext = behat_context_helper::get('behat_general');
$generalcontext->i_type_into_the($keys, $this->drop_xpath($placenumber), 'xpath_element');
$node = $this->get_selected_node('xpath_element', $this->drop_xpath($placenumber));
$this->ensure_node_is_visible($node);
foreach (str_split($keys) as $key) {
$node->keyDown($key);
$node->keyPress($key);
$node->keyUp($key);
}
}
}

0 comments on commit d804067

Please sign in to comment.