You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: toMatchAriaSnapshot cannot parse the snapshot that ariaSnapshot() produces for names starting and ending with "/" #42807
Same thing happens with expect(locator).toMatchAriaSnapshot({ name: 'x.aria.yml' }) on the second run, or after --update-snapshots: the file Playwright writes on the first run fails to parse on the next run.
Expected behavior
The snapshot is rendered with the name quoted (- link "/":) and matches on the next run.
Actual behavior
"- navigation:\n - link /:\n - /url: /"
Error: expect(locator).toMatchAriaSnapshot(expected) failed
Error: Unterminated regex:
link /
^
Other names that start and end with / behave the same: /api/v1/ gives Unexpected input, /[a/ gives Unterminated regex. A name like /docs/ parses, but silently becomes the regex /docs/, so it also matches unrelated names such as xdocsx.
Additional context
packages/isomorphic/ariaSnapshotRenderer.ts (createKey) skips JSON.stringify for any name that starts and ends with /, assuming it is a regex produced by convertToBestGuessRegex. That heuristic runs even when convertStringsToRegex is off (locator.ariaSnapshot(), snapshot files, "Expected/Received" in failure messages, codegen), so a literal name such as / is emitted unquoted and the key parser treats it as a regex.
Root-style links (<a href="/">/</a>) are common in breadcrumbs, path navigation and file/route tables.
Activity
chore: mark v0.0.83 (#1779)
chore: mark v0.1.22 (#473)
chore(deps): update all non-major dependencies (#199)
chore(deps): update dependency @playwright/mcp to v0.0.83 (#1108)
chore: mark v0.0.83 (microsoft#1779)
Update agent CLIs
chore(deps): update dependency @playwright/mcp to v0.0.83 (#3186)
chore(deps): update dependency @playwright/mcp to v0.0.83 (#64)
fix(deps): update patch and minor updates (#27)