-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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-development): bump cypress version #28580
Conversation
…e characters ref: https://github.com/cypress-io/cypress/pull/5813/files (see tests that use encoded messages)
…t some tests actually made use of it ;)
@@ -110,7 +110,7 @@ describe(`navigation`, () => { | |||
|
|||
describe(`Supports unicode characters in urls`, () => { | |||
it(`Can navigate directly`, () => { | |||
cy.visit(`/안녕`).waitForRouteChange() | |||
cy.visit(encodeURI(`/안녕`)).waitForRouteChange() |
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.
@@ -356,7 +356,7 @@ describe(`Keeping caches up-to-date when updating data`, () => { | |||
|
|||
describe(`Keeping caches up to date when modifying list of static query hashes assigned to a template`, () => { | |||
describe(`using gatsby-link`, () => { | |||
it.only(`Navigate from page A to page B, add static query to page A, navigate back to page A`, () => { | |||
it(`Navigate from page A to page B, add static query to page A, navigate back to page A`, () => { |
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.
ops :(
cy.get(`li`) | ||
.its(`length`) | ||
.should(`be`, count + 1) | ||
cy.get(`#fake-data li`).should(`have.length`, count + 1) |
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.
this was acting weirdly - for once - it would resolve .get
as quickly as it wound find any li
- and also it would not allow should('be', foo)
to be actual assertion
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.
this was also all wrong because there is double the amount of li
on the page because #pinc-data
is also on the same page - this was all weird and certainly this test wasn't actually asserting correctly (it was passing by accident or something)
webhookBody.items.forEach(node => createNode(api.getNode(node, helpers))) | ||
webhookBody.items.forEach(node => | ||
createNode(api.addNode(api.getNode(node, helpers))) | ||
) |
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.
api
wasn't tracking this, so resetting was never removing node create through explicit webhookBody.items
way. This meant that gatsby-preview/updating.js
and gatsby-preview/refreshing.js
only kind of worked when they were running in ... alphabetical order - if you would run them manually with cy:open
in different order - those would fail (wat)
it also mean that to rerun those tests you would ... have to restart whole gatsby develop
😱
I also need to mention here that fact that the node is not automatically cleaned up is weird - but this was like that since gatsby@2 (and likely earlier). So this need to be addressed - but it needs new APIs and is possibly breaking change - so I don't consider this a bug and rather a quirk ... (well it might be considered as bug - but it's how it works and changing it now would break whole lot of things than rely on this behaviour)
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.
lgtm
e2e-tests/development-runtime/cypress/integration/hot-reloading/page-queries.js
Show resolved
Hide resolved
9e30e95
to
37c4052
Compare
Description
I had to skip adding e2e tests for loading indicator in #28562 because we use old version of cypress that doesn't seem to have shadow dom support, newer ones seem to have - so let's see how this will go.
There some additional niceties here, like auto-retry (will see how that goes). I also added some cleanup after some of tests because running tests does leave mess behind and we need to clean that mess up manually if we want to rerun tests (when iterating on it).
Also ... some query data caches had
.only
on one of tests (yikes), luckily we didn't mess with runtime in that would affect it (I think), but just unskipping rest of tests too