Skip to content

Conversation

@vincenzo-gasparo
Copy link
Contributor

Add exact parameter to toMatchAriaSnapshot to save raw data

Fixes #38074, references #38074.

Copy link
Contributor

@agg23 agg23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution. We always ask that people file issues first so we can triage and decide whether or not a PR is warranted, but in this case we do think this is something worth implementing (and it's a trivial implementation).

Minor comments: just naming and supporting both overloads.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Test results for "MCP"

2588 passed, 116 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

Test results for "tests 1"

2 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-goto.spec.ts:83 › should work with Cross-Origin-Opener-Policy `@firefox-ubuntu-22.04-node18`

40357 passed, 789 skipped


Merge workflow run.

* since: v1.57.0
- `update` <["raw"]|["relaxed"]>

Controls how the snapshot is updated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the style of similar options like updateSnapshots

I think something like this (feel free to give your opinion on the language):

Defines how the snapshot is updated when used with [`method: TestConfig.updateSnapshots`]. Defaults to `'relaxed'`.
* `'relaxed'` - Saves the accessibility snapshot with a relaxed matching structure (for example regular expressions to match number combinations).
* `'raw'` - Saves the unmodified accessibility snapshot. This snapshot is an exact match and will not match content with changed values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated docs in last commit, very similar to your suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add aria snapshot raw saving

3 participants