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

fix: incorrect typing of "dom.getContainsSelector" #28339

Merged
merged 7 commits into from
Feb 5, 2024
Merged

fix: incorrect typing of "dom.getContainsSelector" #28339

merged 7 commits into from
Feb 5, 2024

Conversation

mistic100
Copy link
Contributor

@mistic100 mistic100 commented Nov 15, 2023

This function has an "options" parameter which is not declared int the typings file.

Additional details

Additonally I think there is a problem in the implementation

On this line the parameter "matchCase" has an effective default value of true

if (_.isRegExp(text) && options.matchCase === false && !text.flags.includes('i')) {

However on this line the effective default value is false

let expr = _.isRegExp(text) ? 'cy-contains-regex' : (options.matchCase ? 'cy-contains' : 'cy-contains-insensitive')

This is not the goal of this PR to fix this, I don't even know how it should be fixed because it could be a breaking change.

PR Tasks

@CLAassistant
Copy link

CLAassistant commented Nov 15, 2023

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@mistic100 mistic100 changed the title fix incorrect typing of "dom.getContainsSelector" fix: incorrect typing of "dom.getContainsSelector" Nov 15, 2023
@mschile mschile requested review from cacieprins and mschile January 30, 2024 16:08
@mistic100
Copy link
Contributor Author

Thanks for the added tests

Copy link

cypress bot commented Feb 5, 2024

4 flaky tests on run #53864 ↗︎

0 5508 73 0 Flakiness 4

Details:

Merge branch 'develop' into patch-1
Project: cypress Commit: 6a9969cfb4
Status: Passed Duration: 16:56 💡
Started: Feb 5, 2024 4:48 PM Ended: Feb 5, 2024 5:05 PM
Flakiness  e2e/origin/origin.cy.ts • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
cy.origin > withBeforeEach > passes runnable state to the secondary origin on retry Test Replay
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-electron

View Output

Test Artifacts
... > correctly returns currentRetry Test Replay
... > correctly returns currentRetry Test Replay
... > correctly returns currentRetry Test Replay

Review all test suite changes for PR #28339 ↗︎

@ryanthemanuel ryanthemanuel merged commit a85f489 into cypress-io:develop Feb 5, 2024
81 of 84 checks passed
@mschile
Copy link
Contributor

mschile commented Feb 5, 2024

@mistic100, thanks for the contribution and sorry for the delay in getting it merged!

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 20, 2024

Released in 13.6.5.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.5, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants