cypress icon indicating copy to clipboard operation
cypress copied to clipboard

fix(react18): unmount component with react18 API

Open rockindahizzy opened this issue 1 year ago • 4 comments

  • Closes #23081

User facing changelog

  • Fixes issue in component testing when using React 18 mount

Additional details

Steps to test

  • Build npm/react and npm/react18 projects
  • Copy the dist folders from the projects and place them in a React project under their respective React folders in node_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?

rockindahizzy avatar Aug 08 '22 23:08 rockindahizzy

Thanks for taking the time to open a PR!

cypress-bot[bot] avatar Aug 08 '22 23:08 cypress-bot[bot]

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:

lmiller1990 avatar Aug 09 '22 03:08 lmiller1990



Test summary

37846 0 469 0Flakiness 8


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 Flakiness
1 ... > logs request + response headers
2 ... > logs Method, Status, URL, and XHR
3 ... > logs response
cypress/proxy-logging.cy.ts Flakiness
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

cypress[bot] avatar Aug 09 '22 12:08 cypress[bot]

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.

lmiller1990 avatar Aug 10 '22 00:08 lmiller1990

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.

cypress-bot[bot] avatar Aug 15 '22 22:08 cypress-bot[bot]