Giter Club home page Giter Club logo

cypress-stale-cookie-issue-reproduction's Introduction

README

This repository is a reproduction for this issue over at Cypress side: cypress-io/cypress#25841

To trigger the Cypress stale cookie issue, we need this interaction:

  1. Visit "Page A" and click the link on that page
  2. The link click leads to a page that sets a cookie and redirects back to "Page A"
  3. The "Page A" now shows the cookie value as a debug information
  4. Cypress is instructed to go "Page B"
  5. "Page B" triggers a fetch request
  6. The server sets a cookie during the fetch request, returns HTTP 204 No Content
  7. "Page B" is reloaded after fetch request is done
  8. "Page B" should show the cookie value

With Cypress v11.2.0, "Page B" indeed shows the cookie value. The situation is not the same with Cypress v12.7.0.

GitHub actions

The Cypress test cypress/e2e/spec.cy.js is running also in GitHub actions and the test failures can be seen there: Actions

Setup steps

Install npm dependencies: npm install

To run Rails test server

Using Docker

docker-compose --project-name=cypress-stale-cookie-repro up --build

Using rbenv

Open the test environment rails server in own terminal:

npm run cypress:rails

Running Cypress itself

Run the Cypress app in another terminal:

npm run cypress:open

You can also run the spec directly without Cypress GUI:

npm run cypress:run

You can also access the test Rails server in a different browser using http://localhost:3333

To run regular development server

The development server automatically reloads code changes while the test server doesn't. Note that this needs rbenv steps to work.

bin/rails server

Then access the application with http://localhost:3000 to test cookies with domains.

cypress-stale-cookie-issue-reproduction's People

Contributors

valscion avatar

Watchers

 avatar  avatar

Forkers

atofstryker

cypress-stale-cookie-issue-reproduction's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.