Skip to content

Commit cf4327a

Browse files
committed
chore(e2e-dev-runtime): bump @testing-library/cypress
1 parent ce46cae commit cf4327a

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

e2e-tests/development-runtime/cypress/integration/gatsby-preview/updating.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ describe(`Gatsby Preview (Updating)`, () => {
1515
it(`displays initial data`, () => {
1616
cy.get(`li:eq(0) a`).click().waitForRouteChange()
1717

18-
cy.queryByText(`Hello World (1)`).should(`exist`)
18+
cy.findByText(`Hello World (1)`).should(`exist`)
1919

20-
cy.queryByText(`0`).should(`exist`)
20+
cy.findByText(`0`).should(`exist`)
2121
})
2222

2323
it(`updates and hot-reloads changes to content`, () => {
2424
cy.get(`li:eq(0) a`).click().waitForRouteChange()
2525

2626
update()
2727

28-
cy.queryByText(`1`).should(`exist`)
28+
cy.findByText(`1`).should(`exist`)
2929
})
3030

3131
it(`updates and hot-reloads new content`, () => {
@@ -45,13 +45,9 @@ describe(`Gatsby Preview (Updating)`, () => {
4545
cy.get(`li`).its(`length`).should(`be`, 1)
4646
})
4747

48-
/*
49-
* TODO: get this test passing in CI
50-
* https://github.com/testing-library/cypress-testing-library/issues/23
51-
*/
52-
it.skip(`can be triggered with webhook data`, () => {
48+
it(`can be triggered with webhook data`, () => {
5349
cy.exec(`npm run update:webhook`)
5450

55-
cy.queryByText(`Hello World from a Webhook (999)`).should(`exist`)
51+
cy.findByText(`Hello World from a Webhook (999)`).should(`exist`)
5652
})
5753
})

e2e-tests/development-runtime/cypress/integration/navigation/redirect.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ describe(`redirect`, () => {
5151
// this is sanity check for this group
5252
it(`make sure 404 is present`, () => {
5353
cy.visit(`/______not_existing_page`).waitForRouteChange()
54-
cy.queryByText("Preview custom 404 page").click()
55-
cy.queryByText("A custom 404 page wasn't detected", {
54+
cy.findByText("Preview custom 404 page").click()
55+
cy.findByText("A custom 404 page wasn't detected", {
5656
exact: false,
5757
}).should(`not.exist`)
58-
cy.queryByText(
58+
cy.findByText(
5959
"You just hit a route that does not exist... the sadness."
6060
).should(`exist`)
6161
})
@@ -83,11 +83,11 @@ describe(`redirect`, () => {
8383

8484
it(`make sure 404 is NOT present`, () => {
8585
cy.visit(`/______not_existing_page`).waitForRouteChange()
86-
cy.queryByText("Preview custom 404 page").click()
87-
cy.queryByText("A custom 404 page wasn't detected", {
86+
cy.findByText("Preview custom 404 page").click()
87+
cy.findByText("A custom 404 page wasn't detected", {
8888
exact: false,
8989
}).should(`exist`)
90-
cy.queryByText(
90+
cy.findByText(
9191
"You just hit a route that does not exist... the sadness.",
9292
{ exact: false }
9393
).should(`not.exist`)

e2e-tests/development-runtime/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"cy:run": "(is-ci && cypress run --browser chrome --record) || cypress run --browser chrome"
4444
},
4545
"devDependencies": {
46-
"@testing-library/cypress": "^4.0.4",
46+
"@testing-library/cypress": "^6.0.0",
4747
"cross-env": "^5.2.0",
4848
"cypress": "3.4.1",
4949
"fs-extra": "^7.0.1",

0 commit comments

Comments
 (0)