diff --git a/lib/capybara/cuprite/node.rb b/lib/capybara/cuprite/node.rb index 45c58eb..fdff0e2 100644 --- a/lib/capybara/cuprite/node.rb +++ b/lib/capybara/cuprite/node.rb @@ -139,7 +139,7 @@ def unselect_option end def tag_name - @tag_name ||= description["nodeName"].downcase + @tag_name ||= description["shadowRootType"] ? "ShadowRoot" : description["nodeName"].downcase end def visible? diff --git a/spec/features/session_spec.rb b/spec/features/session_spec.rb index 427e5e6..a44aea1 100644 --- a/spec/features/session_spec.rb +++ b/spec/features/session_spec.rb @@ -452,7 +452,7 @@ shadow_root = @session.find(:css, "#shadow_host").shadow_root expect do expect(shadow_root).to have_css("#shadow_content", text: "Not in the document") - end.to raise_error(/tag="#document-fragment"/) + end.to raise_error(/tag="ShadowRoot"/) end it "extends visibility check across shadow host boundary" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b7ebf23..b601659 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -59,7 +59,6 @@ module TestSessions node #visible? details non-summary descendants should be non-visible node #visible? works when details is toggled open and closed node #set should submit single text input forms if ended with - node #shadow_root should produce error messages when failing #has_field with valid should be false if field is invalid #has_element? should be true if the given element is on the page #assert_matches_style should raise error if the elements style doesn't contain the given properties