Closed AtofStryker closed 17 hours ago
Passed #58529
•
cd07b42d6c: feat: support react 19 for component testing with cypress/react [run ci]
Project |
cypress
|
Branch Review |
feat/support_react_19
|
Run status |
Passed #58529
|
Run duration | 17m 44s |
Commit |
cd07b42d6c: feat: support react 19 for component testing with cypress/react [run ci]
|
Committer | AtofStryker |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
4
|
Pending |
1103
|
Skipped |
0
|
Passing |
15855
|
View all changes introduced in this branch ↗︎ |
[!WARNING]
No Report: Something went wrong and we could not generate a report for the Application Quality products.
Additional details
Adds React 19 (Not yet officially released) and React 19 Release Candidate support to component. This PR is prematurely supporting React 19 for Component testing as we do not anticipate massive release candidate API changes with React 19. React 19 Release Candidate support is also needed to support Next 15 (not 15 RC, but actual 15).
Testing the build binaries works as expected against a sample React 19 project. This works OOTB since the
ReactDOM.render()
changes merged upstream intocypress/react
in #30590, so no custom test harness is needed 🎉Using the React 19 RC today with Cypress 13x
Since React 19 is not supported today, framework detection does not work correctly and scaffolded dependencies are not satisfied
The
cypress/react
test harness also does not work asReactDOM.render()
was removed in React 19. The user can usecypress/react18
to get this to work, but that is not obvious.Using the React 19 RC on this branch
Dependencies are automatically detected and satisfied. This is partially due to use detecting the release candidate, which I think we can announce we will remove once React 19 is officially released without releasing a breaking change. This requires further discussion
The
cypress/react
test harness works with 19 naturally because it uses the rendering methods used by react 18, which isroot.render()
from theReactDOM/client
package so no change is necessarySteps to test
Highly recommend setting up a sample React 19 project. This is likely easiest with setting up a React project with Vite and then updating the React dependencies following this guide.
How has the user experience changed?
Users can now use Cypress Component Testing with React 19 in Cypress 14
PR Tasks
cypress-documentation
? https://github.com/cypress-io/cypress-documentation/pull/6008type definitions
?