Skip to content

bahmutov/cypress-v10-preserve-cookie-example

Repository files navigation

cypress-v10-preserve-cookie-example cypress version cypress-v10-preserve-cookie version

Cypress.Cookies.preserveOnce for Cypress v10 example

Uses plugin cypress-v10-preserve-cookie

Installation

$ npm install

You will need a MongoDB somewhere and a Redis instance. I assume the MongoDB is running in the cloud and the Redis is running locally in a Docker container.

Run the app

Using docker-compose

$ docker-compose up

Run the server and the web app

$ MONGODB=... SESSION_SECRET=... npm start

Tip: use as-a to inject the above environment variables into a local / user profile file .as-a.ini, something like this:

[chat.io]
SESSION_SECRET=MySecretVariable1234
MONGODB=mongodb://root:rootPass1234@localhost:27017/
$ as-a . npm start

Open the http://localhost:3000 in your browser.

About me

About

Cypress.Cookies.preserveOnce for Cypress v10 example

Topics

Resources

License

Stars

Watchers

Forks