Storybook smoke test does not catch if individual stories are broken #2219
Labels
💻 aspect: code
Concerns the software code in the repository
✨ goal: improvement
Improvement to an existing user-facing feature
help wanted
Open to participation from the community
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
🔧 tech: playwright
Involves Playwright
Problem
See #2218 #2217 #2216 #2215 for examples of broken stories.
Description
All of these could be prevented either by type-checking the stories (impossible due to MDX not supporting TypeScript and our previous commitment to MDX in spite of this for the sake of the description pages for stories, discussion here: #584; also hindered by some components not being typed) or by writing a basic Playwright test for every single story (perhaps one that simply iterates through them all) to confirm there is no warning and that the story at least runs.
The latter is the only reasonable option in light of our commitment to MDX (a lot of work went into converting stories already) and that some of the components in the broken stories above aren't typed anyway (though it would work for many of our stories that do render typed components).
The solution for this is, therefore: write a Storybook playwright test to iterate through all the stories and confirm that no errors are rendered to the page. Note that storybook sometimes still renders something from the story underneath and overlays the error, so it is not enough to merely confirm that there is content from the story. The test must check that there is no error overlay.
The text was updated successfully, but these errors were encountered: