-
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
Typings for cy.contains do not support includeShadowDom #17066
Closed
ashblox opened this issue
Jun 22, 2021
· 4 comments
· Fixed by #17080 · May be fixed by FuhuXia/inventory-app#3
Closed
Typings for cy.contains do not support includeShadowDom #17066
ashblox opened this issue
Jun 22, 2021
· 4 comments
· Fixed by #17080 · May be fixed by FuhuXia/inventory-app#3
Comments
2 tasks
cypress-bot
bot
added
stage: work in progress
stage: needs review
The PR code is done & tested, needs review
and removed
stage: work in progress
stage: needs review
The PR code is done & tested, needs review
labels
Jun 23, 2021
The code for this is done in cypress-io/cypress#17080, but has yet to be released. |
cypress-bot
bot
added
stage: pending release
and removed
stage: work in progress
labels
Jun 24, 2021
Much appreciated. Thank you! |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current behavior
I'm using Cypress with Typescript and while I can pass options to
cy.get()
withincludeShadowDom: true
, I cannot do so withcy.contains()
. It appears the typings differ, wherecy.get()
allows aPartial<Cypress.Shadow>
andcy.contains()
does not. I have tried this using both Cypress v 6.8.0 and v 7.3.0.Screenshot 1 (Works with
cy.get()
):Screenshot 2 (Doesn't work with
cy.contains()
):Desired behavior
I should be able to pass the includeShadowDom argument to
cy.contains()
. My current workaround is to enable includeShadowDom in thecypress.json
but of course that enables it globally.Test code to reproduce
Example repo: https://github.com/ashblox/cypress-issue
This is the file with the issue.
Versions
Confirmed this does not work with 7.5.0 either.
The text was updated successfully, but these errors were encountered: