Skip to content

Migrate Playwright to 1.63 and drop @playwright/experimental-ct-react (#762) - #763

Merged
bedrich-schindler merged 1 commit into
masterfrom
maintenance/762
Oct 4, 2026
Merged

bedrich-schindler merged 1 commit into
masterfrom
maintenance/762

Conversation

@bedrich-schindler

@bedrich-schindler bedrich-schindler commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Playwright 1.63 removed @playwright/experimental-ct-react. Component tests now use the mount(storyId, props) fixture of @playwright/test, following the stack used in RADES:

  • Serve the Playwright Component Testing page in tests/playwright/ct/ with webpack-dev-server (new devDependency), using the loader rules and module resolution of the library build. Playwright starts it through webServer. Enable React.StrictMode, reuseContext and serviceWorkers: 'block' as recommended by Playwright.
  • The project mount fixture returns the rendered component element, so snapshots keep their bounds, parks the mouse pointer outside the viewport and provides getSpyValue().
  • Specs mount stories by ID with plain data props. Callbacks are asserted through *SpyForTest stories using withSpy / useSpy. Assertions that a callback was called are translated as toContain(true), not as exact call counts.
  • Unlike RADES, react-ui passes JSX in props (icons, nodes as labels, sort icons). Such props are described with plain data by element() and turned back into elements by the page. Compositions of library components in InputGroup children are rendered by the story.
  • Portal tests add the portal after mounting, because mount() reloads the page, and re-render the story into it with update().
  • Update the playwright image in Docker and CI to 1.63.0.

Snapshots with a textarea are re-baselined: Chromium shipped with Playwright 1.63 renders the native resize handle differently. All other snapshots are unchanged.

Closes #762 #762

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-04 17:53 UTC

@bedrich-schindler
bedrich-schindler marked this pull request as draft September 30, 2026 12:28
…t` (#762)

Playwright 1.63 removed `@playwright/experimental-ct-react`. Component
tests now use the `mount(storyId, props)` fixture of `@playwright/test`,
following the stack used in RADES:

* Serve the Playwright Component Testing page in `tests/playwright/ct/`
  with `webpack-dev-server` (new devDependency), using the loader rules
  and module resolution of the library build. Playwright starts it
  through `webServer`. Enable `React.StrictMode`, `reuseContext` and
  `serviceWorkers: 'block'` as recommended by Playwright.
* The project `mount` fixture returns the rendered component element,
  so snapshots keep their bounds, parks the mouse pointer outside the
  viewport and provides `getSpyValue()`.
* Specs mount stories by ID with plain data props. Callbacks are
  asserted through `*SpyForTest` stories using `withSpy` / `useSpy`.
  Assertions that a callback was called are translated as
  `toContain(true)`, not as exact call counts.
* Unlike RADES, react-ui passes JSX in props (icons, nodes as labels,
  sort icons). Such props are described with plain data by `element()`
  and turned back into elements by the page. Compositions of library
  components in `InputGroup` children are rendered by the story.
* Portal tests add the portal after mounting, because `mount()` reloads
  the page, and re-render the story into it with `update()`.
* Update the `playwright` image in Docker and CI to 1.63.0.

Snapshots with a `textarea` are re-baselined: Chromium shipped with
Playwright 1.63 renders the native resize handle differently. All other
snapshots are unchanged.
Comment thread src/docs/contribute/testing-guidelines.md
@bedrich-schindler
bedrich-schindler marked this pull request as ready for review October 1, 2026 12:55
@bedrich-schindler
bedrich-schindler merged commit e2c9c52 into master Oct 4, 2026
17 checks passed
@bedrich-schindler
bedrich-schindler deleted the maintenance/762 branch October 4, 2026 17:53

This branch was successfully deployed

1 active deployment
pr-preview/pr-763 — c3defb9c Deployed Sep 30, 2026 by bedrich-schindler via Deploy PR Preview #109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Playwright to 1.63 and drop @playwright/experimental-ct-react

2 participants