Skip to content

Interactivity API for Browser Mode #5770

@sheremet-va

Description

@sheremet-va

Clear and concise description of the problem

There are libraries that allow faking events in jsdom/happy-dom environments (e.g., @testing-library/user-event). They are required in Node.js runtime because there is no actual browser, only Web-compatible globals. In Browser Mode, we have access to an actual browser and providers have access to DevTools and Webdriver protocols that could be used to trigger actual events.

Suggested solution

The userEvent API is very well designed and works great with other @testing-library packages. Since we already decided to recommend testing-library in browser mode, I think we should provide our own userEvent implementation that uses DevTools or Webdriver protocol depending on the provider.

Alternative

No response

Additional context

For the preview provider, we can use the userEvent library directly.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: browserIssues and PRs related to the browser runnerp2-nice-to-haveNot breaking anything but nice to have (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions