playwright/tests/components/ct-react-vite/tests
Simon Knott 208a54529d
fix(ct-react): support shorthand fragment notation (#32900)
Closes https://github.com/microsoft/playwright/issues/32853

Vite turns the shorthand fragment notation `<></>` into `import {
Fragment } from "react"; <Fragment></Fragment>`. On the Node.js side of
things, this `react` import resolves to our mock version of React, which
currently mocks `Fragment` as `{}`. Currently, we pass that straight to
`React.createElement`, which throws an error.

The fix is to make our `Fragment` mock detectable with a tag, and when
we render it replace it with the real `__pwReact.Fragment`.
2024-10-02 11:19:09 +02:00
..
callbacks.spec.tsx test(ct): remove locators (#21963) 2023-03-24 15:55:32 -07:00
children.spec.tsx fix(ct): solid pass children when they are defined (#29648) 2024-02-26 11:15:08 -08:00
react-router.spec.tsx fix(ct-react): do not reset mount hooks upon update (#29072) 2024-01-19 12:55:36 -08:00
render.spec.tsx fix(ct-react): support shorthand fragment notation (#32900) 2024-10-02 11:19:09 +02:00
route.spec.tsx chore: rename `route` fixture in ct (#31817) 2024-07-23 07:43:28 -07:00
unmount.spec.tsx fix(ct): mount then unmount then mount (#30657) 2024-05-14 11:03:46 -07:00
update.spec.tsx test(ct): update child (#22712) 2023-05-01 15:20:46 -07:00