Skip to content

Commit

Permalink
chore(adapters): update readme (#38763)
Browse files Browse the repository at this point in the history
* update readme

* Update e2e-tests/adapters/README.md

---------

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
  • Loading branch information
kathmbeck and pieh committed Dec 18, 2023
1 parent 7c39c32 commit 005534a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions e2e-tests/adapters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ Adapters being tested:

## Usage

- To run all tests, use `npm run test`
- To run individual tests, use `npm run test:%NAME` where `test:%NAME` is the script, e.g. `npm run test:netlify`
- To run all tests, use `yarn test`
- To run individual tests, use `yarn test:%NAME` where `test:%NAME` is the script, e.g. `yarn test:netlify`
- 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.

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.
## Netlify as Target Platform

- 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`.
- You can use any Netlify site that you have access to or create an empty site with the Netlify CLI `ntl sites:create`.
- 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.
- During the initial run, the `DEPLOY_URL` is logged. You can use this to run the tests for debugging like so:
`TRAILING_SLASH=always ADAPTER=netlify DEPLOY_URL=<deployUrlFromPreviousCommand> yarn test:netlify:debug`

### Adding a new adapter

Expand Down

0 comments on commit 005534a

Please sign in to comment.