Skip to content

Instantly share code, notes, and snippets.

@tvon

tvon/env.rb

Last active Aug 29, 2015
Embed
What would you like to do?
Capybara.register_driver :poltergeist_inspector do |app|
Capybara::Poltergeist::Driver.new(app, :inspector => true)
end
Before('@javascript', '@inspector') do
Capybara.javascript_driver = :poltergeist_inspector
end
@javascript @inspector
Scenario: Previewing a new template # features/accounts/templates.feature:23
Given I am a new, authenticated operator # features/step_definitions/login_steps.rb:53
And I am on the plan page # features/step_definitions/navigation_steps.rb:1
:poltergeist_inspector
When I preview a new template # features/step_definitions/template_steps.rb:38
To use the remote debugging, you have to launch the driver with `:inspector => true` configuration option (Capybara::Poltergeist::Error)
./features/step_definitions/template_steps.rb:41:in `/^I preview a new template$/'
features/accounts/templates.feature:26:in `When I preview a new template'
Then I should see the new template PDF # features/step_definitions/template_steps.rb:92
Failing Scenarios:
cucumber features/accounts/templates.feature:23 # Scenario: Previewing a new template
When(/^I preview a new template$/) do
click_on 'add-template'
p Capybara.javascript_driver
page.driver.debug
# (...)
end
@javascript @inspector
Scenario: Previewing a new template
Given I am a new, authenticated operator
And I am on the plan page
When I preview a new template
Then I should see the new template PDF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment