testing-library / cypress-testing-library

🐅 Simple and complete custom Cypress commands and utilities that encourage good testing practices.
http://npm.im/@testing-library/cypress
MIT License
1.8k stars 152 forks source link

Add forward compatibility with Cypress 10 #233

Closed michax closed 1 year ago

michax commented 1 year ago

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:

michax commented 1 year ago

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

NicholasBoll commented 1 year ago

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

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 8.0.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: