-
Notifications
You must be signed in to change notification settings - Fork 3.3k
chore: update win.cookie calls to win.document.cookie call in test #31527
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
Conversation
cypress
|
Project |
cypress
|
Branch Review |
fix-win-cookie-in-tests
|
Run status |
|
Run duration | 18m 24s |
Commit |
|
Committer | Jennifer Shehane |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
1
|
|
77
|
|
0
|
|
5624
|
View all changes introduced in this branch ↗︎ |
Warning
No Report: Something went wrong and we could not generate a report for the Application Quality products.
return !cookie || cookie === '__cypress.initial=true' | ||
}) | ||
|
||
win.document.cookie = 'key=value' |
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.
This test doesn't pass if you pass the SameSite=Strict; Secure; Path=/fixtures
to this cookie. I'm not sure if this is some kind of bug, but that's the only way to get it to pass atm.
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.
something like this though I think fundamentally changes the test. I can look at it tomorrow?
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.
Well, it wasn’t really testing anything to begin with. :/
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.
yeah win.cookie
really isn't anything 😂 . Even if it was document.cookie
that wouldn't even be set in the first place because its not even at that path, so it will not set it and no-op. I think this change is fine.
return !cookie || cookie === '__cypress.initial=true' | ||
}) | ||
|
||
win.document.cookie = 'key=value' |
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.
something like this though I think fundamentally changes the test. I can look at it tomorrow?
return !cookie || cookie === '__cypress.initial=true' | ||
}) | ||
|
||
win.document.cookie = 'key=value' |
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.
yeah win.cookie
really isn't anything 😂 . Even if it was document.cookie
that wouldn't even be set in the first place because its not even at that path, so it will not set it and no-op. I think this change is fine.
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
Remove
ts-expect-error
where we were callingwin.cookie
instead ofwin.document.cookie
.win.cookie
does not exist, but the test was calling and testing this. I updated it towin.document.cookie
Steps to test
How has the user experience changed?
N/A
PR Tasks
cypress-documentation
?type definitions
?