storybookjs / test-runner

🚕 Turn stories into executable tests
https://storybook.js.org/docs/writing-tests/interaction-testing
MIT License
229 stars 72 forks source link

[bug] Start storybook when using the `test-runner` #455

Open alex-page opened 5 months ago

alex-page commented 5 months ago

Describe the bug It's annoying to have to configure scripts to run storybook, wait for storybook to be loaded, run the tests. Storybook has a server and all the infrastructure to put these pieces together for me. Please add an option to start storybook server with the test runner.

To Reproduce Create a test-runner test and you will have to configure your scripts to run, wait and then test.

Expected behavior I expect the test runner for storybook to start a storybook server or have a flag to be able to do this.

loganvolkers commented 4 months ago

Luckily Playwright provides the Web server option to provide exactly this functionality.

The storybook team wouldn't need to do much work to enable this capability in test runner.

alex-page commented 4 months ago

Yep. I am all for using the playwright web server to solve this. I have set this up on other projects and it is shocking to me this is locked away.