Skip to content

Commit 005534a

Browse files
kathmbeckpieh
andauthored
chore(adapters): update readme (#38763)
* update readme * Update e2e-tests/adapters/README.md --------- Co-authored-by: Michal Piechowiak <[email protected]>
1 parent 7c39c32 commit 005534a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

e2e-tests/adapters/README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ Adapters being tested:
99

1010
## Usage
1111

12-
- To run all tests, use `npm run test`
13-
- To run individual tests, use `npm run test:%NAME` where `test:%NAME` is the script, e.g. `npm run test:netlify`
12+
- To run all tests, use `yarn test`
13+
- To run individual tests, use `yarn test:%NAME` where `test:%NAME` is the script, e.g. `yarn test:netlify`
14+
- If you want to open Cypress locally as a UI, you can run the `:debug` scripts. For example, `yarn test:netlify:debug` to test the Netlify Adapter with Cypress open.
1415

15-
If you want to open Cypress locally as a UI, you can run the `:debug` scripts. For example, `npm run test:netlify:debug` to test the Netlify Adapter with Cypress open.
16+
## Netlify as Target Platform
17+
18+
- If deploying the site to Netlify as the target platform, you can run `yarn test:netlify` with the following environment variables set, `E2E_ADAPTERS_NETLIFY_SITE_ID=<yourSiteId>`, `NETLIFY_AUTH_TOKEN=<yourAuthToken>`, and `GATSBY_TEST_SKIP_CLEANUP=1`.
19+
- You can use any Netlify site that you have access to or create an empty site with the Netlify CLI `ntl sites:create`.
20+
- Setting `GATSBY_TEST_SKIP_CLEANUP` to `1`, prevents the deploy from being deleted after the test run so you can iterate on the tests using the same deploy.
21+
- During the initial run, the `DEPLOY_URL` is logged. You can use this to run the tests for debugging like so:
22+
`TRAILING_SLASH=always ADAPTER=netlify DEPLOY_URL=<deployUrlFromPreviousCommand> yarn test:netlify:debug`
1623

1724
### Adding a new adapter
1825

0 commit comments

Comments
 (0)