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
chore(e2e-dev-runtime): bump @testing-library/cypress and adjust current data updates testing setup #26500
chore(e2e-dev-runtime): bump @testing-library/cypress and adjust current data updates testing setup #26500
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,16 +34,16 @@ | |
"test": "npm run start-server-and-test || (npm run reset && exit 1)", | ||
"posttest": "npm run reset", | ||
"reset": "node scripts/reset.js", | ||
"reset:preview": "node plugins/gatsby-source-fake-data/reset.js && npm run update:preview", | ||
"reset:preview": "curl -X POST http://localhost:8000/__refresh", | ||
"update": "node scripts/update.js", | ||
"update:webhook": "node scripts/webhook.js", | ||
"update:preview": "curl -X POST http://localhost:8000/__refresh", | ||
"update:preview": "curl -X POST -d '{ \"fake-data-update\": true }' -H \"Content-Type: application/json\" http://localhost:8000/__refresh", | ||
"start-server-and-test": "start-server-and-test develop http://localhost:8000 cy:run", | ||
"cy:open": "cypress open", | ||
"cy:run": "(is-ci && cypress run --browser chrome --record) || cypress run --browser chrome" | ||
}, | ||
"devDependencies": { | ||
"@testing-library/cypress": "^4.0.4", | ||
"@testing-library/cypress": "^6.0.0", | ||
"cross-env": "^5.2.0", | ||
"cypress": "3.4.1", | ||
"fs-extra": "^7.0.1", | ||
|
@@ -56,5 +56,8 @@ | |
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/gatsbyjs/gatsby" | ||
}, | ||
"resolutions": { | ||
"cypress": "3.4.1" | ||
Comment on lines
+59
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix/workaround for https://app.circleci.com/pipelines/github/gatsbyjs/gatsby/48158/workflows/3227d59e-b7ae-4eeb-b109-06a9712b44c2/jobs/491859 ( because of deps spaghetti it tries to install 2 instances of cypress and cypress use single tmp location for binary download and this results in 2 different downloads writing things to same filepath which corrupts it). This is somewhat forcing single instance of cypress to workaround this problem Some existing tickets about this problem:
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,9 @@ exports.sourceNodes = async function sourceNodes({ | |
reporter.info(`Webhook data detected; creating nodes`) | ||
webhookBody.items.forEach(node => createNode(api.getNode(node, helpers))) | ||
} else { | ||
if (!(webhookBody && webhookBody[`fake-data-update`])) { | ||
await api.reset() | ||
} | ||
Comment on lines
+32
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is meant to result in "initial" data state, unless we want to trigger refresh/update explicitly for this plugin |
||
const [updated, deleted = []] = await api.sync(helpers) | ||
|
||
updated.forEach(node => createNode(node)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's one of breaking changes in
@testing-library/cypress@6
- https://github.com/testing-library/cypress-testing-library/releases/tag/v6.0.0This comment applies to all replacements like that here