Change default AUT reloading and Cypress Cookie API behavior to align with cookie specifications #24094
Labels
topic: cookies 🍪
topic: cy.origin
Problems or enhancements related to cy.origin command
type: breaking change
Requires a new major release version
Milestone
Current behavior
Currently, Cypress Cookie APIs do not correctly set domain on cookie values.
The default value provided for
domain
in the documentation isn't correct and is actually the super domain of the hostname. The reason I believe we do this is because we need to be able to set cookies in across-origin
/same-site
context, as Cypress does NOT reload the AUT when super domain origin policies match. For example:Desired behavior
When
cy.origin
is released as Generally Available (GA) or close to GA, I believe we should change this behavior to the followingcy.origin
block, which will accurately set cookies in the spec iframecy.origin
command with the introduction of same origin spec bridgeshostname
as the domain instead of thesuperDomain
remote_states
to use origin policy instead of super domain origin when pushing origins onto the stackdoesAUTMatchTopSuperDomainOrigin
to bedoesAUTMatchTopOrigin
to remove the iframe source when origins do not match instead of super domain origins when triggering interactive snapshot mode.server-e2e
to check for origin policy match instead of super domain origin policy when checking for cross origin.Test code to reproduce
See issue #23698 for
setCookie
behaviorCypress Version
10.9.0
Node version
16.15.0
Operating System
macOS 12.6
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: