Skip to content

Instantly share code, notes, and snippets.

@radar
Created April 15, 2013 05:25
Show Gist options
  • Save radar/5385898 to your computer and use it in GitHub Desktop.
Save radar/5385898 to your computer and use it in GitHub Desktop.
nesting of 20 is too deep (JSON::NestingError)
./features/support/interactors.rb:4:in `hover_over'
./features/step_definitions/shortlist_new_steps.rb:11
./features/step_definitions/shortlist_new_steps.rb:10:in `/^I click the product shortlist link in the main navigation$/'
features/public/shortlists/view_product_shortlist.feature:10:in `And I click the product shortlist link in the main navigation'
module InteractionHelpers
def hover_over(text)
page.evaluate_script('$("*:contains(\"'+text+'\")").mouseover()');
end
end
World(InteractionHelpers)
Given /^I have no (.+) on my shortlist$/ do |type|
# This deliberately does nothing
end
When /^I visit the homepage$/ do
visit root_path
end
When /^I click the product shortlist link in the main navigation$/ do
within 'nav.secondary' do
hover_over 'Shortlists'
click_link 'Product Shortlist'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment