https://cypress.io logo
Hi everyone. I'm here for a help. I'm facing an is...
# e2e-testing
b
Hi everyone. I'm here for a help. I'm facing an issue related to cookies being set in browser with Cypress. https://github.com/cypress-io/cypress/discussions/21509#discussioncomment-3009357 I'm relatively new with Cypress .. I've spent so much time with this issue.It would be really helpful if someone takes a look
l
I'm not very familiar with secure cookies (and local development considerations), but would it be possible to test with http:// instead of https:// ?
b
Ignore secure cookie part. I have. Removed secure attribute from cookie. https://github.com/cypress-io/cypress/discussions/21509#discussioncomment-3009357 This comment speaks about the issue.
l
I went to look at my own application in the Cypress runner... all my cookies are set with / as the path, even the csrf cookies. Sorry, I'm not sure what's going on with yours.
b
If you compare screenshots of actual app in browser and Cypress you could see Cypress run has only one single Set-cookie header. And resulting cookies set with incorrect path and httponly attribute is set incorrectly.
Tried it with Cypress 10.3.0 still same issue
This screenshot suggest there are 3 cookies. Two XSRF-TOKEN with path as '/' and httpOnly as 'false' and also one other cookie JSESSIONID with path /scv' and httpOnly as true
This screenshot of the same request it can be seen that only one cookie is considered which is XSRF-TOKEN but with path '/scv' and httpOnly as true which is not the right attributes. They are attributes of JSESSIONID cookie which is not even set
2 Views