-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qa] Add readme for end-to-end testing
- Loading branch information
Benedicte Emilie Brækken
committed
Jan 28, 2021
1 parent
b3db232
commit b4d18db
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# End-to-end testing Studio | ||
|
||
Before you can run the tests you need to add a sesstion token | ||
so the tests are able to log in. | ||
|
||
Open the test studio in Chrome ou | ||
would normally). Open the "Developer Console", navigate to | ||
|
||
1. Open test studio in a browser (by running `npm start` as you | ||
normally would) | ||
2. Open "Developer console" and find the value of the `sanitySession` | ||
cookie | ||
3. Set the environment variable by running | ||
```shell | ||
export CYPRESS_SANITY_SESSION_TOKEN='<...>' | ||
``` | ||
where you replace `<...>` with the value from step 2 | ||
|
||
Run the tests like so: | ||
|
||
``` | ||
$ npm run test-e2e | ||
``` | ||
|
||
Or open cypress for interactivity: | ||
|
||
``` | ||
$ cypress open | ||
``` |
b4d18db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: