module StillLife::CapybaraExtension::SessionExtension

Public Instance Methods

visit(*) click to toggle source
Calls superclass method
# File lib/still_life/capybara_extension.rb, line 23
def visit(*)
  super.tap do
    if body.present?
      StillLife.draw(body)
    end
  end
end

Private Instance Methods

accept_modal(*) click to toggle source
Calls superclass method
# File lib/still_life/capybara_extension.rb, line 31
        def accept_modal(*)
  Thread.current[:_still_life_inside_modal] = true
  body_was = body
  super.tap do
    if body.present? && (body != body_was)
      StillLife.draw(body)
    end
  end
ensure
  Thread.current[:_still_life_inside_modal] = nil
end
dismiss_modal(*) click to toggle source
Calls superclass method
# File lib/still_life/capybara_extension.rb, line 43
        def dismiss_modal(*)
  Thread.current[:_still_life_inside_modal] = true
  body_was = body
  super.tap do
    if body.present? && (body != body_was)
      StillLife.draw(body)
    end
  end
ensure
  Thread.current[:_still_life_inside_modal] = nil
end