Created
June 2, 2010 12:38
-
-
Save simonrentzke/422316 to your computer and use it in GitHub Desktop.
This file contains 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
# Then /^"([^\"]*)" should be in the autocomplete menu$/ do |name| | |
# xpath_to_auto_complete_selection = "//ul[contains(@class, 'ui-autocomplete')]" | |
# | |
# # wait until auto complete menu appears | |
# page.should have_xpath(xpath_to_auto_complete_selection) | |
# page.evaluate_script('$("#show_title").attr("value", "my p")') | |
# page.evaluate_script('e = jQuery.Event("keydown")') | |
# page.evaluate_script('e.which = 67') | |
# page.evaluate_script('$("#show_title").trigger("focus").trigger(e)') | |
# | |
# debugger | |
# # check that the correct value is selected | |
# find(xpath_to_auto_complete_selection).text.should == name | |
# end | |
# | |
# Then "trigger autocomplete menu" do | |
# page.evaluate_script('e = jQuery.Event("keydown");e.which = 67;$("#show_title").trigger("focus").trigger(e);'); | |
# end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment