e2e-tests/adapters/README.md
E2E testing suite for Gatsby's adapters feature. If possible, run the tests locally with a CLI. Otherwise deploy the site to the target platform and run Cypress on the deployed URL.
Adapters being tested:
yarn testyarn test:%NAME where test:%NAME is the script, e.g. yarn test:netlify:debug scripts. For example, yarn test:netlify:debug to test the Netlify Adapter with Cypress open.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.ntl sites:create.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.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:debugcypress/configstest: script that should run start-server-and-test. You can check what e.g. test:netlify is doing.As mentioned in Creating an Adapter you can use this test suite for your own adapter.
Copy the whole adapters folder, and follow adding a new adapter.