fix(tools): migrate unit test runner from playwright to puppeteer#3121
Merged
bennypowers merged 7 commits intomainfrom May 1, 2026
Merged
fix(tools): migrate unit test runner from playwright to puppeteer#3121bennypowers merged 7 commits intomainfrom
bennypowers merged 7 commits intomainfrom
Conversation
Playwright 1.57.0 removed `page.accessibility.snapshot()`, breaking all a11y tree snapshot tests. Puppeteer still supports this API. Replaced `@web/test-runner-playwright` with `@web/test-runner-chrome` plus `puppeteer` in pfe-tools peer dependencies. BREAKING CHANGE: downstream consumers must install `puppeteer` and `@web/test-runner-chrome` instead of `@web/test-runner-playwright`. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 5febfeb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Contributor
✅ Commitlint tests passed!More Info{
"valid": true,
"errors": [],
"warnings": [],
"input": "fix(tools): migrate unit test runner from playwright to puppeteer"
} |
Contributor
Replace raw snapshot property access (deep.equal, children?.find, children?.filter) with ax helper assertions (axContainRole, axContainQuery, axContainName, axTreeFocusedNode, querySnapshot, querySnapshotAll). This makes tests resilient to snapshot format differences between browser automation backends (Puppeteer includes extra properties like backendNodeId, loaderId that Playwright did not). Also fixes chai `.not` flag bleeding through `.and` chaining in combobox-controller tests by splitting into separate expect() calls. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Contributor
Puppeteer's Chrome requires --no-sandbox on GitHub Actions runners where unprivileged user namespaces are restricted by AppArmor. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
The SSR test container used playwright v1.48.2 but the lockfile resolved playwright v1.57.0, causing browser binary mismatches. Aligns `@playwright/test` peerDep with `playwright` at ~1.57.0. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Replace raw snapshot destructuring and role string comparisons with ax helpers. Puppeteer uses 'StaticText' role instead of 'text', and includes extra properties in snapshot nodes. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
- Set concurrency to 1: concurrent pages in same browser cause focus contention, making keyboard/mouse tests flaky. This affects both Playwright and Puppeteer. - Add `press()` utility to pfe-tools that decomposes modifier key combos (e.g. Shift+Tab) for Puppeteer compatibility, since Puppeteer does not support combo key names in `keyboard.press()`. - Fix accordion tests: replace `axTreeFocusOn(document.body)` with assertions that don't depend on page-level focus (Puppeteer can't Tab out of the page). Remove Shift+Tab-to-body tests that test browser chrome behavior, not component behavior. - Fix search-input Tab test: assert listbox collapsed instead of checking page-level focus state. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
zeroedin
approved these changes
May 1, 2026
Collaborator
zeroedin
left a comment
There was a problem hiding this comment.
Landed Granular Tests Migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
page.accessibility.snapshot(), which broke all a11y treesnapshot tests (321 uses across 57 test files)
@web/test-runner-playwrightto@web/test-runner-chrome+puppeteer,which still supports the accessibility snapshot API
axRole,axName,axContainRole,axTreeFocusOn, etc.)work identically with no test file changes
Breaking change
Downstream consumers of
@patternfly/pfe-toolsmust update their dependencies:@web/test-runner-playwright@web/test-runner-chromeandpuppeteerTest plan
tsc --noEmit)