Skip to content
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

Expose React Root on cypress/react test harness for Cypress 14 #30622

Open
AtofStryker opened this issue Nov 15, 2024 · 0 comments
Open

Expose React Root on cypress/react test harness for Cypress 14 #30622

AtofStryker opened this issue Nov 15, 2024 · 0 comments
Labels
Cypress 14 Issues scoped for Cypress 14 npm: @cypress/react @cypress/react package issues type: feature New feature that does not currently exist

Comments

@AtofStryker
Copy link
Contributor

What would you like?

cypress/react with Cypress 14 should support returning the root created by ReactDom.createRoot in the case users wish to call an unmount.

Why is this needed?

Since cypress/react supports React 18 (and up) with Cypress 14 and ReactDom.unmountComponentAtNode is deprecated in React 18 and removed in React 19, Cypress should return the root created from ReactDom.createRoot in the case users want to call an unmount. This can no longer be done strictly with getContainerEl()

Other

We likely need to hang onto getContainerEl() for a bit longer as users may not have migrated away from it, but we should deprecate this method in addition to this work as it will likely be removed once we fully support react 19 only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cypress 14 Issues scoped for Cypress 14 npm: @cypress/react @cypress/react package issues type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

1 participant