Skip to content
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

[Bug] shadowContains does not retry if the item is not found #27

Closed
DesignByOnyx opened this issue Dec 17, 2019 · 0 comments · Fixed by #28
Closed

[Bug] shadowContains does not retry if the item is not found #27

DesignByOnyx opened this issue Dec 17, 2019 · 0 comments · Fixed by #28
Assignees
Labels
bug Something isn't working

Comments

@DesignByOnyx
Copy link
Contributor

DesignByOnyx commented Dec 17, 2019

Current behavior:

Using shadowContains suffers from most of the same issues as shadowFind (#25 and fixed in #26). The biggest issues is that it does not retry if the element is not immediately found. It also doesn't search the light DOM of custom elements. After researching the internals, Cypress only triggers its "retry" logic if a method returns a jquery collection. Using Cypress.$ to query the DOM fixes the issue. I plan on submitting a PR soon.

Desired behavior:

If the element is not found immediately, Cypress should retry until the timeout is reached.

Steps to reproduce: (app code and test code)

Try to use shadowContains on an element which is not immediately available. I can create a repo if need be - just let me know.

Versions

cypress@3.7.0
cypress-shadow-dom@1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants