Skip to content

Support for @vitest/browser-playwright #277

@Juice10

Description

@Juice10

Is your feature request related to a problem? Please describe.
I'd like to use one test runner instead of spreading e2e my tests over multiple test runners.

Describe the solution you'd like
I'd like you to support adding a plugin to vitest. Now that vitest includes @vitest/browser-playwright it could be possible to add a plugin and have chromatic take snapshots of the end to end tests in vitest.
Alternatively you could take over Vitest's toMatchScreenshot('hero-section') but it wouldn't be as nice and complete as @chromatic-com/playwright is today.

Describe alternatives you've considered
Running both next to each other.
Or doing snapshot testing with vitest only: https://vitest.dev/api/browser/assertions.html#tomatchscreenshot

Additional context
Related discussion: storybookjs/storybook#32930
Vitest' visual regression testing: https://vitest.dev/guide/browser/visual-regression-testing.html
Vitest' toMatchScreenshot function: https://vitest.dev/api/browser/assertions.html#tomatchscreenshot
Vitest storybook add-on: https://storybook.js.org/docs/writing-tests/integrations/vitest-addon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions