Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Brower Mode] Support aria snapshot matcher #6933

Open
4 tasks done
Smrtnyk opened this issue Nov 19, 2024 · 1 comment
Open
4 tasks done

[Brower Mode] Support aria snapshot matcher #6933

Smrtnyk opened this issue Nov 19, 2024 · 1 comment

Comments

@Smrtnyk
Copy link

Smrtnyk commented Nov 19, 2024

Clear and concise description of the problem

Playwright has added aria snapshot feature
https://www.youtube.com/watch?v=P4R6hnsE0UY

Suggested solution

Add toMatchAriaSnapshot matcher like playwright added

Alternative

No response

Additional context

No response

Validations

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Nov 20, 2024

Since I saw microsoft/playwright#33014, I was thinking someone can port their serializer as Vitest's custom snapshot serializer https://vitest.dev/guide/snapshot.html#custom-serializer. That should allow expect(element).toMatchInlineSnapshot(...) to work more or less like theirs, but with auto update. They have a regex to allow loose match https://playwright.dev/docs/aria-snapshots#matching-with-regular-expressions but that's not possible with custom serializer though.

I'm not sure how much of the usefulness is proved on their side, so probably we should wait a bit before considering to bring this as Vitest's builtin.

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

No branches or pull requests

2 participants