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

Cypress is not preserving cookies for base URL when it redirects to the other URL - All browsers #30464

Open
dheerajpiplani opened this issue Oct 25, 2024 · 0 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this topic: cookies 🍪

Comments

@dheerajpiplani
Copy link

dheerajpiplani commented Oct 25, 2024

Current behavior

Browser - Electron
Cypress version - 13.5.1
URL - https://capitalconnect.jpmorgan/

While launching this URL with cypress in electron, I don't see this URL call and associated cookies in Dev tools and i see the network call related to redirected URL and cookies associated with it. Since we're not preserving the cookies for the original URL and that's why our login is failing and it returns 400 bad request as app is trying to match the mod_oidc cookie that is set to the original URL

Desired behavior

When we launch the above URL manually on chrome then we see the url and cookie preserved to the original URL. This should happen with electron too while launching via cypress using cy.visit command.

Test code to reproduce

Here's my test code. Please launch it on cypress using electron browser -

describe('Visit a URL', () => {
  it('should navigate to the specified page', () => {
    cy.visit('https://capitalconnect.jpmorgan/');
  });
});

Please check the developers tool and you won't see this call (https://capitalconnect.jpmorgan/) with associated cookies. But you would see while launching with Chrome or other browser.

Cypress Version

13.5.1

Node version

18.20.4

Operating System

Windows

Debug Logs

No response

Other

No response

@dheerajpiplani dheerajpiplani changed the title Cypress is not preserving cookies for base URL when it redirects to the other URL - Electron browser Cypress is not preserving cookies for base URL when it redirects to the other URL - All browsers Oct 28, 2024
@jennifer-shehane jennifer-shehane added topic: cookies 🍪 stage: needs investigating Someone from Cypress needs to look at this labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this topic: cookies 🍪
Projects
None yet
Development

No branches or pull requests

2 participants