Skip to content

Commit a1fea66

Browse files
fix: improvements for cypress in cypress testing with snapshots (cypress-io#25256)
1 parent c344e37 commit a1fea66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ chai.use(sinonChai)
6060

6161
export async function e2ePluginSetup (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) {
6262
// @ts-ignore getSnapshotResult is injected by the snapshot script
63-
if (typeof global.getSnapshotResult === 'undefined') {
64-
throw new Error('getSnapshotResult is undefined. v8 snapshots are not being used in Cypress in Cypress')
63+
if (!['1', 'true'].includes(process.env.DISABLE_SNAPSHOT_REQUIRE) && typeof global.getSnapshotResult === 'undefined') {
64+
throw new Error('getSnapshotResult is undefined. v8 snapshots are not being used in Cypress in Cypress. This can happen if CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT is not set')
6565
}
6666

6767
process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF = 'true'

packages/launchpad/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"cypress:open:ct": "yarn cypress:run-cypress-in-cypress gulp open --component --project .",
1515
"cypress:run:ct": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --component --project .",
1616
"cypress:run:e2e": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --e2e --project .",
17-
"dev": "yarn gulp dev --project .",
17+
"dev": "yarn cypress:run-cypress-in-cypress gulp dev --project .",
1818
"start": "echo 'run yarn dev from the root' && exit 1",
1919
"watch": "echo 'run yarn dev from the root' && exit 1",
2020
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, ."

0 commit comments

Comments
 (0)