Conversation
…and pattern galleries The gallery stories (AllMiniIcons, the Regular icon galleries, AllIllustrations, AllPatterns) render every asset and run axe over all of them — slow and redundant with each component's Default story, and the source of the flaky contrast failures. Add tags: ['!test'] so addon-vitest skips them; they still render in Storybook for browsing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skip render/a11y tests on the full asset gallery stories
The icon/illustration/pattern "gallery" stories each render every asset in the set and then run axe over all of them. Under
@storybook/addon-vitestthat's slow and low-value — each catalog is redundant with its component'sDefaultstory. This excludes just the galleries from the test run while keeping them browsable in Storybook.What changed
Added
tags: ['!test']to the gallery stories:Icons/Mini→AllMiniIconsIcons/Regular→RegularInterfaceIcons,RegularLearningEnvironmentIcons,RegularVendorIcons,RegularSkillIconsIllustrations→AllIllustrationsPatterns→AllPatternsHow it works
Storybook auto-applies a
testtag to every story, and addon-vitest runs the tagged ones.tags: ['!test']removes that tag from a single story, so the test run ignores it — a per-story opt-out. The stories still render normally inyarn start:storybook; only the automated render + a11y check is skipped. Each component'sDefault(representative) story still runs, so the component itself stays covered.Effect on the run
Test count per file drops to just
Default:Mini2 → 1,Regular5 → 1,Illustrations2 → 1,Patterns2 → 1That removes the slowest, most-redundant stories from the Vitest sweep.
Testing instructions
Also confirm they're still visible in the UI:
yarn start:storybook→ the gallery stories (AllMiniIcons, AllIllustrations, AllPatterns, the Regular icon galleries) still render in the sidebar and canvas; they're just absent from the test run.PR Checklist