-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
clearCookie
not working anymore in 3.5.0 under certain baseUrls
#5453
Comments
Hey @jweingarten, the example you provided works in 3.5.0 in Chrome and Electron when run during Please provide an entirely reproducible example - also, there is an open cookies issue involving 3.5.0 here - #5432 ensure your issue is not related to this one also. |
Ok I found what you need to reproduce .... and that is basically setting a Here the exact steps:
describe('Load Main Dashoard after Login', function() {
context('Login', function() {
it('The Main Dashboard should be able to load now', function() {
cy.setCookie('foo', 'bar')
cy.clearCookie('foo')
cy.getCookie('foo').should('be.null')
});
});
});
{
"baseUrl":"https://www.google.com"
}
Result: |
@jweingarten Thanks! I can reproduce this after setting a I also confirmed this was introduced in 3.5.0 3.4.1 DEBUG cookies3.5.0 DEBUG cookies |
Not only Our tests have a fast login and logout implementation, like the docs show, that doesn't work anymore after updating to 3.5.0.
|
Related: #3221 (might be fixable together) |
I am having the same. |
This works in some cases and fails in others (I've only tested in Electron, but results should be the same in Chrome). Here are the
So the issue seems related to setting cookies on a FQDN. I have written some automated tests for this here: #5478 I'll continue working on fixing this in that PR. |
Not sure if it's related, but I couldn't get cypress to clear a cookie on a |
Thanks for the additional info! There were some huge changes in how cookies are handled in Cypress 3.5.0. We went from a split approach (using Electron |
Additional: we use DELETE requests to reset test data. The GET requests still work, but the DELETE's don't work any more since 3.5.0. The requests now return a 403 status |
clearCookie
not working anymore in 3.5.0clearCookie
not working anymore in 3.5.0 under certain baseUrls
The code for this is done in cypress-io/cypress#5478, but has yet to be released. |
Released in |
Our code used to do exactly what the documentation states:
This works with 3.4.1 and started failing with 3.5.0.
Since there are tickets about
clearCookies
not working this was the only way we actually could delete a specific cookie. Now even that doesn't work any longer.The text was updated successfully, but these errors were encountered: