Skip Implementation Decision
Status: Superseded
Current Branch: skip-failing-stories
This branch implements a title+name based skip list for quickly excluding failing Storybook tests.
Implementation (commit 3afafdd)
// Config
skip: [
{ title: "Components/Tables", name: "Default" },
{ title: "Components/Tables", name: "Aligned Left" },
]
// Schema
export interface SkipEntry {
title: string;
name: string;
}
Why This Approach?
- Practical: We have title+name from Jenkins console/reg.json, not story IDs
- Simple: Easy to copy-paste from failing test output
- Human-readable: Matches what developers see in Storybook UI
- Quick: Solves immediate problem of unblocking CI
Alternative: feat/skip-param Branch
There's a more comprehensive implementation in feat/skip-param (commit c8dddf3):
// Config
stories: {
"components-tables--default": { skip: true },
"components-tables--aligned-left": { skip: true },
}
// Or inline on manual pages
pages: [
{ name: "Homepage", path: "/", skip: true }
]
Advantages of feat/skip-param
- Story ID matching: More reliable (story IDs are unique)
- Precedence system: Config overrides > story parameters
- Unit tests: 28 tests covering skip logic
- Inline skip: Can skip manual pages directly
- Future-proof: Ready for Storybook parameters support
Disadvantages for Current Use Case
- Requires story IDs: We don't have them from Jenkins output
- More complex: Need to map title+name → story ID
- Verbose config: One line per story instead of array
Recommendation
Short term (now):
- Keep current
skip: SkipEntry[]implementation - It solves the immediate problem
- Easy to use with Jenkins/reg.json output
Long term (next sprint):
- Merge
feat/skip-paramfor story-level parameters - Migrate skip list to story IDs
- Support both approaches (array + stories map)
Migration Path
When merging feat/skip-param:
- Keep
skip?: SkipEntry[]for convenience - Add
stories?: Record<string, StoryTestConfig>for advanced use - Update
shouldSkipStory()to check both:- First: stories map (by ID)
- Then: skip array (by title+name)
- Precedence: stories map > skip array > story parameters
This gives us best of both worlds.