orange-buffalo / simple-accounting

1 stars 0 forks source link

Try replacing Storybook #1186

Open orange-buffalo opened 7 months ago

orange-buffalo commented 7 months ago

What we have

We use Storybook for executing screenshot tests, mostly for components in various states but also for some pages (which we will remove some time in the future). We do not need any other feature of Storybook.

However, Storybook maintenance cost is very high. They constantly break the APIs and require complex migrations, they bring dirty dependencies into the project.

Goals

Get rid of Storybook, preserving screenshot tests for components:

  1. We do not need fancy navigation. In the worst case, a single "contents" page with links to all "stories" would be sufficient.
  2. Potentially, we can use https://vitejs.dev/guide/build.html#multi-page-app support. However, it is not clear if the build output can be clear in this case, as we do not want to bring this tests compiled frontend into Production code.
  3. We then can replace obscure infrastructure waitFor* helpers with standard Playwright lookups/assertions.
orange-buffalo commented 7 months ago

https://histoire.dev/guide/vue3/stories.html looks very promising (native Vue and Vite support), but Bun does not support it yet: https://github.com/oven-sh/bun/issues/3787