-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
cy.contains() falsely failing when using negative assertion 'not.contain' #6384
Comments
For some reason, Needs investigating. |
Did we update a dependency in |
Actually this might have to do with |
/cc @chrisbreiding and @bkucera |
Sorry, I was wrong. #5653 introduced this regression. |
@sainthkh no worries, it was broken before that if you used a regex, but no one noticed. I'm working on the fix, which should clean up some logic. |
The code for this is done in cypress-io/cypress#6434, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
When I use the
not.contain
assertion chained off of.contains()
, it falsely fails. I suspect this is some regression introduced in #5653 cc @sainthkh3.8.3
4.0.0
Desired behavior:
The
div
does not contain the textnew
and should pass.Test code to reproduce
index.html
This test falsely fails ❌
This test passes though ✅
This makes me believe it has to do with the return value of
cy.contains()
And this passes though ✅
Versions
Cypress 4.0.0
The text was updated successfully, but these errors were encountered: