-
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
cy.contains() improvements: normalizing whitespaces, case-sensi… #5653
Merged
chrisbreiding
merged 16 commits into
cypress-io:v4.0-release
from
sainthkh:issue-92-fix
Jan 30, 2020
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
105b13c
migrate vscode eslint settings
bahmutov bcc48f2
merged develop
bahmutov bd66f35
Handles whitespaces with newlines.
sainthkh 7408ec3
Feature: contains() matches case insensitivity
sainthkh 5acb51b
Fixed merge conflicts.
sainthkh b31a7dd
Fixed conflicts.
sainthkh 12c79f0
Added option type, CaseMatchable.
sainthkh 53b3365
Fixed lint error.
sainthkh fc2c1d0
Added test for leading/trailing spaces.
sainthkh ff5b9c5
Add an error message for regex and matchCase conflict.
sainthkh 89cc3f8
Fix the valid case that throws an error.
sainthkh ec02a09
Fix how error message is thrown.
sainthkh 6e28b78
update some cli deps that have fallen out of date since last commit
jennifer-shehane 67aabe9
Merge branch 'v4.0-release' into issue-92-fix
jennifer-shehane 8f2cef3
Merge branch 'v4.0-release' into issue-92-fix-local
chrisbreiding 4a4150c
update cli snapshot
chrisbreiding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why the exception for
pre
tags? I mean, I can kind of get the logic, but it does seem strange to make an exception for a single tag and this not be documented anywhere. I guess that's my concern. Someone opening an issue one day like, 'this is working differently here' and we have this undocumented exception.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.
pre
tag preserves whitespaces like this:https://codepen.io/sainthkh/pen/jOEpzmX
So, it is the exception. Because I thought it reflects how browsers work.
Do you think we need a section for this behavior in
contains()
documentation?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.
Yeah...probably adding a section in the Notes of the
.contains()
doc so that people can find this somehow. There's are other exception notes in there.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.
What about elements styled with
white-space: pre;
?We have cases where upgrading to Cypress 4 breaks tests where we're explicitily want to vaildate that the whitespace is present as it is rendered. Should there be a flag allowing override of this behaviour?
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.
@mariusnn It's going on #6411.