-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Remove strict cookie validation from cookie commands #5957
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
Test summaryRun details
View run in Cypress Dashboard ➡️ 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 |
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.
I see we previously validated getCookie
, setCookie
, and clearCookie
- and that we wrap the error but this error message is never tested.
Can we write a driver test or e2e test that actually causes this to fail - so we can provide a good error experience? For instance, in the old extension API's - when chrome would fail to set a cookie it would provide a virtually useless error.
@brian-mann There is such a test for setCookie: cypress/packages/driver/test/cypress/integration/commands/cookies_spec.coffee Lines 490 to 503 in 237cbf4
The error looks like this: I'll apply similar wrapping to the other cookie commands. |
User facing changelog
cy.setCookie
,cy.clearCookie
, andcy.getCookie
has been removed.Additional details
How has the user experience changed?
Users will now get the browser's error message and won't be subject to the overly strict strict-cookie-parser rules
PR Tasks