Skip to content

Add an example of vue component testing via browser mode with playwright #3154

@jd-solanki

Description

@jd-solanki

Clear and concise description of the problem

Hi 👋🏻
I'm building Vue UI framework - Anu

I really liked browser mode and I'm eagerly waiting for the stability of this feature. I must say we can't completely test our
vue components with jsdom when we build the UI framework and use vitest for testing. Browser mode is a huge encouragement for using vitest but in the early stage I did experience the #3124 and found that adding an example of testing vue component with Playwright's chrome as a browser provider that demonstrates browser API access like window.getComputedStyle will be easy for us to adopt and use, Moreover, it will also allow vitest team to quickly identify if there's any bug.

Suggested solution

n/a

Alternative

Not writing tests at all 😓

Additional context

I'm waiting for browser mode stability to make robust tests for testing vue components. I hope using browser mode will provide the same environment as the real browsers for robustness.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions