Skip to content

Commit

Permalink
readme updates regarding TEST_SESSION_COOKIE
Browse files Browse the repository at this point in the history
  • Loading branch information
alishaevn committed Feb 13, 2024
1 parent 6fca8ff commit 2091b26
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,16 @@ There are 2 types of Cypress tests, e2e & component.
If you are creating an e2e test, it will live in the `cypress/e2e` directory. Component tests will need to be created in a directory called `cypress/component `

#### Cypress ENV Variables
- the Cypress suite requires an environment variable that should be stored in your `.env.development` and not committed to git.
- the Cypress suite requires an environment variable that should be stored in your `.env` and not committed to git.
- TEST_SESSION_COOKIE=
- to get the value for this variable, open your browser to your running app at `localhost:3000`.
- to get the value for this variable, open your browser to your running app at `localhost:3000`
- sign in
- inspect the page
- click the "Application" tab
- Chrome: click the "Application" tab
- Firefox: click the "Storage" tab
- click "Cookies"
- find the value for `next-auth.session-token`
- copy that value and paste it in the `TEST_SESSION_COOKIE` variable in your .env.development
- copy that value and paste it in the `TEST_SESSION_COOKIE` variable in your ``.env``
- do not ever commit this value
- this value will need to be updated whenever the cookie expires, approximately once per month

Expand Down

0 comments on commit 2091b26

Please sign in to comment.