Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(production-e2e): Add offline tests #10940

Merged
merged 29 commits into from
Feb 1, 2019
Merged

test(production-e2e): Add offline tests #10940

merged 29 commits into from
Feb 1, 2019

Conversation

vtenfys
Copy link
Contributor

@vtenfys vtenfys commented Jan 9, 2019

Changes:

  • Introduce CYPRESS_SUPPORT env variable for whether to enable Cypress API hooks, and when running tests, set this variable
  • Use TEST_PLUGIN_OFFLINE env variable to determine whether or not to install the offline plugin when testing
  • Add some additional tests which check the SW is installed correctly and perform a few things which I'd been manually testing
    • Existing production-runtime tests also now run both without and with gatsby-plugin-offline
  • Update CircleCI config to allow running custom test commands
  • Disable chromeWebSecurity for production-runtime tests because it doesn't work with service workers :(
  • Delete some Cypress files accidentally added in the wrong place

@vtenfys vtenfys requested a review from a team as a code owner January 9, 2019 10:27
@vtenfys
Copy link
Contributor Author

vtenfys commented Jan 26, 2019

Gatsbygram tests failed due to a segfault, not due to code changes here

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this in - ideally we could adjust config a bit so it's more clear when production-runtime tests in offline or non-offline mode - right now there is single step ./scripts/e2e-test.sh "e2e-tests/production-runtime" "yarn test && yarn test:offline", but it's better to have those tests at all.

Thanks @davidbailey00!

@pieh pieh merged commit a251b3c into gatsbyjs:master Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants