Skip to content

Use vite storybook plugin for storybook tests#3960

Open
toger5 wants to merge 13 commits into
livekitfrom
toger5/storybook-tests
Open

Use vite storybook plugin for storybook tests#3960
toger5 wants to merge 13 commits into
livekitfrom
toger5/storybook-tests

Conversation

@toger5
Copy link
Copy Markdown
Contributor

@toger5 toger5 commented May 11, 2026

run via pnpm test:storybook

Content

This PR adds the vitest-storybook plugin.
This runs playwright and executes interaction tests and runs smoke tests. All this is connected to our codecov test coverage.

Motivation and context

We would like to work with a stricter separation between viewModel logic and view.
This is a step towards this:

  • the view will only run storybook tests. (smoke tests that we run with all prop configuration that is of interest for us and that we will review in storybook)
  • interaction tests that only check for the most basic callbacks (click here-> callback A gets called. Nothing more)

We will then have every logic that goes beyond this in the viewModel which is easier to test view unit tests.
This saves us time from dom checking (getByRole...)

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Checklist

  • I have read through CONTRIBUTING.md.
  • Pull request includes screenshots or videos if containing UI changes
  • Tests written for new code (and old code if feasible).
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

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

Labels

PR-Developer-Experience Release note category. A PR that does not change EC but improves working with the repository.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant