[Bug] shadowContains does not retry if the item is not found
DesignByOnyx opened this issue · 0 comments
DesignByOnyx commented
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