Module: Cucumber::Rails::CapybaraJavascriptEmulation
- Included in:
- Capybara::Driver::RackTest::Node
- Defined in:
- lib/cucumber/rails/capybara_javascript_emulation.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 |
# File 'lib/cucumber/rails/capybara_javascript_emulation.rb', line 4 def self.included(base) base.class_eval do alias_method :click_without_rails_javascript_emulation, :click end end |
Instance Method Details
#click_with_rails_javascript_emulation ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/cucumber/rails/capybara_javascript_emulation.rb', line 10 def click_with_rails_javascript_emulation if link_with_onclick_from_rails? Capybara::Driver::RackTest::Form.new(driver, js_form(self[:href], emulated_method)).submit(self) else click_without_rails_javascript_emulation end end |