Open techwizzdom opened 1 month ago
Repro:
// passes
it('cookie not null', () => {
cy.visit("https://docuseal.co/s/pPQVsffQSFwiYm")
cy.getCookie("_docu_seal_session").should('not.be.null')
})
//fails
it('cookie null', () => {
cy.visit("/") // just to visit the base origin first
cy.visit("https://docuseal.co/s/pPQVsffQSFwiYm")
cy.origin("https://docuseal.co", () => {
cy.getCookie("_docu_seal_session").should('not.be.null')
})
})
I am seeing the same behaviour with cy.origin
. I can see the cookies are defined, but they are not sent with the requests.
Current behavior
The part of the flow in my app is signing a contract, provided by DocuSeal. When I visit a desired URL, e.g.
https://docuseal.co/s/pPQVsffQSFwiYm
, I try to fill in the contract and submit the form.The submit fails, and the reason for it is that DocuSeal cookie is not included in the request - so I get 422 as a response.
However, when I check the application tab > cookies within Cypress, I can see that
_docu_seal_session
is set:Even if I try to get the cookie with
cy.getCookie
, nothing happens. I've tried to wait for a few seconds to make sure the cookie is set, but it's not.Desired behavior
The cookie should be sent with the request. The cookie should also be visible when doing cy.getCookie within a different origin.
Test code to reproduce
Cypress Version
v13.13.3
Node version
v18.12.1
Operating System
macOS 14.6
Debug Logs
No response
Other
Debugs logs are too long, here's the Google drive link.