-
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 pollution of :contains pseudo selector #6434
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
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.
I manually verified that this fixes the original issue.
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.
this PR is a little weird in that its mutating jquery's $.expr[':']
which will persist after the query has run...
it may be worth deleting the :cy-contains
selector.
there is a method in jquery that "compiles" selectors as well, which we may want to do
Also your comment here:
TODO: this should be revisited eventually. Right now there are 3 different contains variants - cy.contains(...) (which takes options), expect(...).contain(...), and cy.get(...).should('contain', '...')
There are not 3 variants, there are only 2 right? .should('contain')
is the same thing as expect(...).to.contain(...)
yeah?
* 4.0.2 release * Update 4.0.2.md * Update 4.0.2.md * Update 4.0.2.md * add cypress-io/cypress#6434 Co-authored-by: Brian Mann <brian.mann86@gmail.com>
* Add link to docker-compose plus cypress/included example * 4.0.2 release (#2510) * 4.0.2 release * Update 4.0.2.md * Update 4.0.2.md * Update 4.0.2.md * add cypress-io/cypress#6434 Co-authored-by: Brian Mann <brian.mann86@gmail.com> Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com> Co-authored-by: Zach Bloomquist <github@chary.us> Co-authored-by: Brian Mann <brian.mann86@gmail.com>
fixes issue introduced by cy.contains() improvements: normalizing whitespaces, case-sensi… #5653
TODO: this should be revisited eventually. Right now there are 2 different
contains
variants -cy.contains(…)
(which accepts options), andexpect(…).contain(…)
/cy.get(…).should('contain', …)
(which do not accept options)Closes cy.contains() falsely failing when using negative assertion 'not.contain' #6384
User facing changelog
fix regression introduced in
4.0
causing incorrect assertion when chaining.should('contain', …)
on acy.contains(…)
Additional details
How has the user experience changed?
PR Tasks