Skip to content
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

how to disable clear all cookies before each testcase #6691

Closed
mingyixu opened this issue Mar 10, 2020 · 5 comments
Closed

how to disable clear all cookies before each testcase #6691

mingyixu opened this issue Mar 10, 2020 · 5 comments

Comments

@mingyixu
Copy link

mingyixu commented Mar 10, 2020

Current behavior:

Cypress automatically clears all cookies before each test to prevent state from building up.

how to disable? use Cypress.Cookies.preserveOnce() or Cookies.defaults() is not work.

this feature effect my login by sso.

cy.visit("http://xxx.com?sso_ticket=xxxx")

the same testcase run on cypress 3.1.5 and 3.6.1,can login in。 but on cypress 3.7.0 ~ 4.1.0 not work,can't login in,Its were badly affected。

I check 3.7.0 release notes, this bugfixs:

Fixed a regression in 3.5.0 where a cy.visit that changes superdomain would incorrectly clear cookies of other domains. Fixes #5756.

Fixed a regression in 3.5.0 where cookies set in a redirect on a cy.visit or in a cy.request with a custom Domain that is not a subdomain of the current domain would fail to set. Fixes #5656.

pls help me to check it, I can provided more infos。

Desired behavior:

Test code to reproduce

Versions

cypress : 4.1.0
chrome: 80
system:linux,mac

@eGoudi
Copy link

eGoudi commented Mar 10, 2020

I have the same problem

@mingyixu
Copy link
Author

mingyixu commented Mar 10, 2020

the same testcase run on cypress 3.1.5 and 3.6.0,can login in。 but on cypress 3.7.0 ~ 4.1.0 not work,can't login in,Its were badly affected。

@jennifer-shehane
Copy link
Member

Unfortunately we have to close this issue as there is not enough information to reproduce the problem. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please comment in this issue with a reproducible example and we will consider reopening the issue.

@mingyixu
Copy link
Author

@jennifer-shehane :After the version upgrade to 4.1.0, my integration test execution is blocked. I hope to help you see this problem. If you need to provide any logs(debug logs which part), I'd like to provide them.

@jennifer-shehane
Copy link
Member

We'll need a reproducible example or sufficient enough explanation of the preserveOnce not working (showing DevTools of where cookie should not be cleared but is being cleared logging the values of the cookies, etc - comparing pre 3.7.0 to other version directly). We're happy to reopen if there's a way we can see and reproduce the problem ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants