Skip to content
master
gatsby/e2e-tests/
gatsby/e2e-tests/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
mdx
 
 
 
 
 
 
 
 

README.md

End to End Tests

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.

Adding a new e2e test

  • 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

Running the Tests

  • cd to the test (e.g. cd e2e-tests/gatsby-image)
  • Install dependencies: yarn or npm install
  • OPTIONAL: Use gatsby-dev-cli to link current changes in packages
  • Run the test script, e.g. yarn test or npm 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! πŸ’œ

You can’t perform that action at this time.