vitro
Cypress
vitro | Cypress | |
---|---|---|
2 | 174 | |
397 | 46,167 | |
- | 0.4% | |
0.0 | 9.8 | |
about 3 years ago | 4 days ago | |
TypeScript | JavaScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vitro
-
Storybook lightweight alternative 2022?
check out this one https://github.com/remorses/vitro
-
Storybook: UI component explorer for front end developers
I’ve used storybook for 4 years in teams of 1-15 devs and I’d say it’s a must have for any serious react app with 3+ full time developers. It has its rough edges sure but the ROI is 10x nonetheless in my experiences.
Advantages
- Testing components in isolation forces some good practices and allows to keep the codebase in check by encouraging good practices (limited coupling of unrelated parts of the codebase
- It’s super productive because it is both a form of unit tests, useful during development of UX in « TDD mode », and a very good documentation of your UI components. It greatly reduces the effort needed for both these aspects.
- For DX, the hot reload is generally faster in storybook than in the App (except if you use vite/snowpack in your app, so far..) because reloading a single component is faster than reloading the whole app and its state. In a large CRA our hot reload could sometimes take up 1min in complex cases, while storybook was taking 3s.
- Coupled with Chromatic (their hosted platform) and its GitHub integration it makes QA and visual regression testing a joy, 10x faster than alternatives, I really recommend that.
- It allows to share/iterate easily your ongoing developments with non-tech people in your organisation at early stage. A very good bridge between Figma and the final UI. A good support during Daily meetings about UI, just shared the deployed story url to ask for feedback.
Drawbacks
- It has its own Webpack config. So if you have a custom Webpack config in your app (don’t do that anyway, unless absolutely necessary) then be prepared to duplicate the customizations in your storybook config
- Global React Contexts needs to be duplicated in your storybook config and, if necessary, configured for individual stories. For example if your signup button changes based on an Auth status stored in a global context, then you will have to use Story.parameters to customize the content of the Auth context.
- We had a couple instances where storybook was the limiting factor for us to embrace some new/fancy tech, like yarn v2 or service worker. However maybe that’s a good litmus test: things that storybook support are state of the art JS and generally safe to use. Things that storybook does not support out of the box will cause you problems with other tools anyway: if it’s not storybook, some other tool like Cypress, Jest, Next, or some browsers will cause you trouble with your “shiny new tech”
- It can be slow to startup. We had a storybook with 300+ complex stories and it took 5min to startup and 10min to build in the CI
- It had some API changes/ migration pains a couple years back. However I think the new API is very good and will last a long time so this is behind.
Overall I definitely advocate to use storybook, especially with Chromatic, the ROI is 10x. If you find yourself limited by it in 2021 despite configuring it, maybe question your own tech stack.
Don’t try to implement your own storybook copycat (we had a colleague develop an alternative https://github.com/remorses/vitro , but i think it was not worth the effort)
If you want to see a state of the art repo in NextJS that uses storybook extensively with some customizations, check https://github.com/Labelflow/labelflow/
Cypress
-
Simulating Internet Outage and Recovery using Cypress
In this blog post, we'll explore a Cypress test that replicates this scenario, utilizing the powerful intercept command to manipulate network requests and responses.
-
Testing Defer Blocks in Angular with Cypress
Recently I came across this issue while triaging some issues at Cypress. (Shout out to MattiaMalandrone for creating an issue with clear instructions for how to reproduce). After quickly replicating the issue I sought after a solution which ultimately inspired me to write this article.
- Cypress changed older versions to block third-party plugins (ignoring lockfiles)
- Cypress can't open Tesla.com website
-
What is Playwright?
While similar to Puppeteer, Cypress, and Selenium, there are some differences. Let’s find out what they are.
- Episode 23/37: ISR in Angular, Cypress & Playwright
-
/Does Cypress Component Testing Work With Libraries
This questions was asked a while ago and pretty much went unanswered: https://github.com/cypress-io/cypress/issues/23677. If it doesn't work with libraries yet I will stop battling with it for now. If it doesn't work, what are you using to test libraries?
- Finally promising Web Testing solution
-
Episode 23/27: NgRx 16.1 & Signal Store, Jest, Cypress, Nx
Cypress Release Notes
- Trouble/Weirdness with accessing aliased values in `this` context