-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: update system tests and prep for react18 harness removal/upstream merge for component testing #30614
chore: update system tests and prep for react18 harness removal/upstream merge for component testing #30614
Conversation
cypress Run #58413
Run Properties:
|
Project |
cypress
|
Branch Review |
chore/update-tests-prep-react-18-ct-update
|
Run status |
Passed #58413
|
Run duration | 17m 44s |
Commit |
cbdb33a5bb: chore: update system tests to use react 18 and install latest dependencies for a...
|
Committer | AtofStryker |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
4
|
Pending |
1326
|
Skipped |
0
|
Passing |
29318
|
View all changes introduced in this branch ↗︎ |
UI Coverage
45.79%
|
|
---|---|
Untested elements |
188
|
Tested elements |
163
|
Accessibility
92.56%
|
|
---|---|
Failed rules |
3 critical
8 serious
2 moderate
2 minor
|
Failed elements |
892
|
…ncies for applicable system tests. use react18 harness before removal [run ci]
04b374f
to
cbdb33a
Compare
@@ -1789,7 +1789,7 @@ jobs: | |||
PLATFORM: linux | |||
machine: | |||
# using `machine` gives us a Linux VM that can run Docker | |||
image: ubuntu-2004:202111-02 | |||
image: ubuntu-2004:2024.05.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.
needs to be updated since find-up
update in the module-api
system test is now on version 7 and cannot be installed with node 16. ubuntu-2004:202111-02
ships with node 16, as ubuntu-2004:2024.05.1
ships with node 20.13.0
@@ -42,7 +42,7 @@ | |||
"src/**/*.js" | |||
], | |||
"engines": { | |||
"node": ">=8" | |||
"node": ">=18" |
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.
just a missed detail. Cypress requires node 18 and up so this is a non breaking change
line: 26, | ||
column: 8, | ||
line: 19, | ||
isPreprocessorWithTypescript: true, |
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 is needed here since we are having stack codeframe/stacktraces now transpiled from typescript 4 to 5, which is slightly different than what is expected in the javascript context
@@ -70,6 +71,8 @@ export const verify = (title, ctx, options) => { | |||
// code frames will show this as the 1st line | |||
if (isCyOrigin) { | |||
cy.get('.test-err-code-frame pre span').should('include.text', `('${title}',,function()`) | |||
} else if (isPreprocessorWithTypescript) { |
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.
has to do with using typescript in some of these on ts version 5 vs 5, which means the transpilation is slightly different. This is related to #29614
@@ -616,6 +625,23 @@ When Cypress detects uncaught errors originating from your test code it will aut | |||
Cypress could not associate this error to any specific test. | |||
|
|||
We dynamically generated a new test to display this failure. | |||
Error: The following error originated from your test code, not from Cypress. |
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.
Why is this error showing up twice in the output?
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.
It's the update to babel-loader
from from 8
to 9
. We usually append the error in the stack output if we can find it, and I think the enhancement there is making it show up
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.
Will that look weird to the user to have it show up twice? Or is this just a system test nuance?
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.
I don't believe so since this is our default behavior if we can discover a message. My guess is previously there wasn't a message attached with the error and now there is, so we have something to print
Additional details
The goal of this PR is to get our system tests up to date with the latest technologies that we support. This means:
webpack
/webpack-dev-server
fromv4
tov5
and related loaders/dependenciestypescript
fromv4
tov5
is most tests (except ts 4 explicit tests)react
system tests from16x
/17x
to18x
and using thecypress/react18
test harness as a precursor to breaking: remove support for React 16 and 17 for Cypress Component Testing. Additionally, remove thecypress/react18
testing harness and merge it upstream withcypress/react
#30590 (react17 system tests are removed here).package.json
webpack-preprocessor-awesome-typescript-loader
tests as it isn't actively maintained andts-loader
is now the used loader by mostreact-app-webpack-5-unconfigured
app and replacing withreact18-webpack-unconfigured
as it is a lot smaller and easier to maintain (not theeject
edcreate-react-app
)issue-25951-next-app
is removed as this is tested with next versions over 13 passively. We currently support 14+module-api
snapshots needed to be updated with updatingsnap-shot-it
2 major versions, so now the snapshots live in a single fileto make the system tests on webpack more deterministic, I changed the stat output to be errors only so we don't have a lot of drift when new modules or times exist in the snapshot
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?