Created
June 8, 2011 01:27
-
-
Save mikel/1013603 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When /^I click on the "([^"]*)" question$/ do |title| | |
question = Question.find_by_title(title) | |
all(:css, "form#edit_question_#{question.id} thead").each { |node| node.click } | |
end | |
When /^I press enter in the "([^"]*)" field$/ do |name| | |
page.execute_script(%Q{ | |
var e = jQuery.Event('keypress'); | |
e.keyCode = 13; | |
$("##{name}").trigger(e); | |
}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment