These are end to end tests triggered via a CI job. You can run these tests locally by following the instructions below, and they're automatically run as part of a CI workflow which runs when the packages/ or e2e-tests/ directory is changed in a commit.
- Create a folder
e2e-tests/name-of-the-test
- Copy structure from an existing test, e.g. e2e-tests/path-prefix
- Add your tests in
e2e-tests/name-of-the-test/cypress/integration/your-test-here.js
cd
to the test (e.g.cd e2e-tests/gatsby-image
)- Install dependencies:
yarn
ornpm install
- OPTIONAL: Use gatsby-dev-cli to link current changes in packages
- Run the
test
script, e.g.yarn test
ornpm test
Alternatively you can do what the CI does:
- From the gatsby root run
./scripts/e2e-test.sh "e2e-tests/gatsby-image" "yarn test"
- The script uses sudo to install -g gatsby-cli. You won't need to and you can ctrl+c the prompt away
Thanks for contributing to Gatsby! 💜