cypress
cypress copied to clipboard
fix(react18): unmount component with react18 API
- Closes #23081
User facing changelog
- Fixes issue in component testing when using React 18 mount
Additional details
Steps to test
- Build
npm/react
andnpm/react18
projects - Copy the
dist
folders from the projects and place them in a React project under their respective React folders innode_modules/cypress
- Run cypress in the React project
How has the user experience changed?
PR Tasks
- [x] Have tests been added/updated?
- [x] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
- [na] Has a PR for user-facing changes been opened in
cypress-documentation
? - [na] Have API changes been updated in the
type definitions
?
Thanks for taking the time to open a PR!
- Create a Draft Pull Request if your PR is not ready for review. Mark the PR as Ready for Review when you're ready for a Cypress team member to review the PR.
- Become familiar with the Code Review Checklist for guidelines on coding standards and what needs to be done before a PR can be merged.
I tried it out (build the new react modules and stuck them in an existing project's node_modules/cypress) and it's working great, nice job :100:
Test summary
Run details
Project | cypress |
Status | Passed |
Commit | b500714321 |
Started | Aug 9, 2022 10:01 PM |
Ended | Aug 9, 2022 10:22 PM |
Duration | 20:17 💡 |
OS | Linux Debian - 11.3 |
Browser | Multiple |
View run in Cypress Dashboard ➡️
Flakiness
![]() |
commands/xhr.cy.js ![]() |
3 ![]() |
|
---|---|---|---|
1 | ... > logs request + response headers | ||
2 | ... > logs Method, Status, URL, and XHR | ||
3 | ... > logs response | ||
![]() |
cypress/proxy-logging.cy.ts ![]() |
2 ![]() |
|
1 | Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged first | ||
2 | ... > intercept log has consoleProps with intercept info | ||
This comment includes only the first 5 flaky tests. See all 8 flaky tests in the Cypress Dashboard. |
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard
Nice, second latest job went all green: https://app.circleci.com/pipelines/github/cypress-io/cypress?branch=zachw%2Ffix-react18-unmount
Not sure why the info in the checkbox is showing red, maybe because I canceled the later build (due to the previous one passing). Let's ship it.
Released in 10.5.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.5.0, please open a new issue.