[rb] Add test for detached shadow root error type #14267
Merged
+9
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
Description
While investigating #13580, I noticed that the shadow root implementation done here:
d44b41b
Returns the following error:
Which is the expected DetachedShadowRootError, so I just added a test on the shadowroot expect to validate the implementation and we should remove the rb label from #13580
Motivation and Context
Tests such as this are important to validate we throw the expected error, when as in this case the shadow root gets detached from the element
Types of changes
Checklist
PR Type
Tests
Description
DetachedShadowRootError
is raised when a shadow root is detached.NoMethodError
.Changes walkthrough 📝
shadow_root_spec.rb
Add test case for detached shadow root error
rb/spec/integration/selenium/webdriver/shadow_root_spec.rb
DetachedShadowRootError
.div
, removes thediv
, and expects an error when accessing the shadowroot.