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

chore: deprecate Cypress.Cookies.preserveOnce and Cypress.Cookies.defaults #21455

Merged
merged 5 commits into from May 16, 2022

Conversation

mschile
Copy link
Contributor

@mschile mschile commented May 12, 2022

User facing changelog

  • Cypress.Cookies.preserveOnce() and Cypress.Cookies.defaults() are deprecated. In a future release, support for
    Cypress.Cookies.preserveOnce() and Cypress.Cookies.defaults() will be removed. Consider using cy.session() instead.

Additional details

  • Marked the Cypress.Cookies.preserveOnce() and Cypress.Cookies.defaults() APIs as deprecated.
  • Added console warning when the APIs are accessed.

How has the user experience changed?

Screen Shot 2022-05-12 at 2 04 16 PM

Screen Shot 2022-05-13 at 10 12 08 AM

### PR Tasks

@mschile mschile requested a review from a team as a code owner May 12, 2022 20:08
@mschile mschile requested review from jennifer-shehane and removed request for a team May 12, 2022 20:08
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 12, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented May 12, 2022



Test summary

39154 0 465 4Flakiness 1


Run details

Project cypress
Status Passed
Commit cb444dd
Started May 13, 2022 8:44 PM
Ended May 13, 2022 8:59 PM
Duration 15:09 💡
OS Linux Debian - 10.11
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/commands/actions/click_spec.js Flakiness
1 ... > scroll-behavior > can scroll to and click elements in html with scroll-behavior: smooth

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

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only deprecating the use of these within the types, so only users with TypeScript would see this. We should also send a warning message to the console when these commands are used like cy.route: https://github.com/cypress-io/cypress/blob/10.0-release/packages/driver/src/cy/commands/xhr.ts#L400:L400

@mschile mschile merged commit fdaf5fb into develop May 16, 2022
@mschile mschile deleted the issue-21333_deprecate_cookies branch May 16, 2022 14:15
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 23, 2022

Released in 9.7.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 23, 2022
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.

Mark Cypress.Cookies.preserveOnce and Cypress.Cookies.defaults as deprecated
6 participants