storybook vs cypress component testing

preview_player
Показать описание

install

npm run storybook

npm run cy:open-ct
Рекомендации по теме
Комментарии
Автор

Hey,
I never post comment but here I totally disagree.
You cannot compare cypress and Storybook. Nobody will use Cypress to build his UI or design system. Go ask the frontend in your team. You should have done this before posting this.

For the one Who don't know storybook.
Storybook is made to build component in isolation. It's an easy way to create your components and to build design system.
And it's use by the biggest company in the world.

Cypress is made to test your apps and your components. It's a great tool to create your test.
And Yeah, You're right you can put JSX or HTML in the "mount" function. So you can display your component in cypress test like you said. But it's not because you can do somehting that is the right solution. Why do you think QA use Cypress instead of doing manual test ? In the end its the same things but you use cypress beacuse it made your life easier. Its the same thing with storybook for frontends.
I really advice you to ask you frontends teammate. Because for a frontends point of view this makes no sense

By the way. I don't know if you checked But if you want to compare cypress and Storybook.
You should compare it to storybook intercation test and Chromatic cloud based tool chaine for storybook.

gauthierbrin