mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Don't wait for element in inspect
This commit is contained in:
parent
59750ebfef
commit
4474c01c06
2 changed files with 4 additions and 3 deletions
|
@ -371,9 +371,9 @@ module Capybara
|
|||
end
|
||||
|
||||
def inspect
|
||||
%(#<Capybara::Node::Element tag="#{tag_name}" path="#{path}">)
|
||||
%(#<Capybara::Node::Element tag="#{base.tag_name}" path="#{base.path}">)
|
||||
rescue NotSupportedByDriverError
|
||||
%(#<Capybara::Node::Element tag="#{tag_name}">)
|
||||
%(#<Capybara::Node::Element tag="#{base.tag_name}">)
|
||||
rescue => e
|
||||
if session.driver.invalid_element_errors.any? { |et| e.is_a?(et)}
|
||||
%(Obsolete #<Capybara::Node::Element>)
|
||||
|
|
|
@ -161,7 +161,8 @@ RSpec.shared_examples "Capybara::Session" do |session, mode|
|
|||
it "outputs obsolete elements" do
|
||||
@session.visit('/form')
|
||||
el = @session.find(:button, 'Click me!').click
|
||||
sleep 2
|
||||
expect(@session).to have_no_button('Click me!')
|
||||
expect(el).not_to receive(:synchronize)
|
||||
expect(el.inspect).to eq "Obsolete #<Capybara::Node::Element>"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue