Skip to content

Commit

Permalink
add query on demand variant for e2e dev tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Dec 21, 2020
1 parent 3200333 commit 4a08694
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,14 @@ jobs:
CYPRESS_PROJECT_ID: 917bea
CYPRESS_RECORD_KEY: 4750fb36-4576-4638-a617-d243a381acef

e2e_tests_development_runtime_query_on_demand:
<<: *e2e_tests_development_runtime_alias
environment:
GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND: true
CYPRESS_QUERY_ON_DEMAND: true
CYPRESS_PROJECT_ID: konj5u
CYPRESS_RECORD_KEY: e38d5b36-5188-4e26-88c1-7c0f9e283fdb

e2e_tests_development_runtime_with_experimental_react:
<<: *e2e_tests_development_runtime_alias

Expand Down Expand Up @@ -624,6 +632,8 @@ workflows:
<<: *e2e-test-workflow
- e2e_tests_development_runtime_fast_refresh:
<<: *e2e-test-workflow
- e2e_tests_development_runtime_query_on_demand:
<<: *e2e-test-workflow
- e2e_tests_production_runtime:
<<: *e2e-test-workflow
- themes_e2e_tests_production_runtime:
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/services/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export async function initialize({
// we don't want to ever have this flag enabled for anything than develop
// in case someone have this env var globally set
delete process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND
} else if (isCI()) {
} else if (isCI() && !process.env.CYPRESS_SUPPORT) {
delete process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND
reporter.warn(
`Experimental Query on Demand feature is not available in CI environment. Continuing with regular mode.`
Expand Down

0 comments on commit 4a08694

Please sign in to comment.