-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: bug where cy.createSnapshot would interact with documents using custom elements #8080
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@panzarino So nice. I confirmed manually that this fixes the original bug.
This actually fixes this other issue also, where calling clone would trigger an attributeChangedCallback
within the application. #7187 (comment) This case may be more testable - seems you could ensure this isn't called if snapshots are on. I wonder if it's the same reason that's causing the polymer issue?
@chrisbreiding may have some advice on writing a test case or assessing why this is happening.
@chrisbreiding added you for review since this seems to be fixing a Shadow DOM-related issue, apparently unrelated to the new Shadow DOM changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@panzarino please add a test case here that demonstrates what is happening to shadow DOM elements on clone and that it is no longer happening
also, wow, shadow DOM? that was NOT my guess at all as to why this was happening 🤣
attributeChangedCallback
to be triggered on custom elements #7187User facing changelog
cy.createSnapshot
would interact with documents using custom elementsAdditional details
See the following test case as reported in the issue
Before:
After:
The page loads properly as expected
PR Tasks