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

Add forward compatibility with Cypress 10 #233

Merged
merged 2 commits into from
Nov 15, 2022

Conversation

michax
Copy link
Contributor

@michax michax commented Oct 25, 2022

Adding forward compatibility with Cypress 10 which now deprecated cy.state('subject') usage and directs developers
to use cy.currentSubject() instead.

Cypress changelog mentioning above: https://docs.cypress.io/guides/references/changelog#10-5-0
image

Without those changes, Cypress 10 spams dev tools console log with hundreds of warnings about usage of deprecated cy.state('subject'). Makes debugging harder then it should be.

How:

Checking for existence of new currentSubject method in cy object and using it instead when present.

Checklist:

  • Documentation
  • Tests. Need some guidance on how to approach testing for this scenario.
  • Ready to be merged

@michax
Copy link
Contributor Author

michax commented Oct 25, 2022

Any suggestions how to write Tests for this change? Or is dev/manual testing enough?

@NicholasBoll
Copy link
Contributor

I'm good with manual testing. I've manually verified there are no more warnings in the log.

@NicholasBoll NicholasBoll self-assigned this Nov 15, 2022
@NicholasBoll NicholasBoll merged commit 8882e41 into testing-library:main Nov 15, 2022
@github-actions
Copy link

🎉 This PR is included in version 8.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@SimenB SimenB mentioned this pull request Nov 17, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants