Skip to main content

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?​

  1. Practical: We have title+name from Jenkins console/reg.json, not story IDs
  2. Simple: Easy to copy-paste from failing test output
  3. Human-readable: Matches what developers see in Storybook UI
  4. 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​

  1. Story ID matching: More reliable (story IDs are unique)
  2. Precedence system: Config overrides > story parameters
  3. Unit tests: 28 tests covering skip logic
  4. Inline skip: Can skip manual pages directly
  5. Future-proof: Ready for Storybook parameters support

Disadvantages for Current Use Case​

  1. Requires story IDs: We don't have them from Jenkins output
  2. More complex: Need to map title+name → story ID
  3. 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-param for story-level parameters
  • Migrate skip list to story IDs
  • Support both approaches (array + stories map)

Migration Path​

When merging feat/skip-param:

  1. Keep skip?: SkipEntry[] for convenience
  2. Add stories?: Record<string, StoryTestConfig> for advanced use
  3. Update shouldSkipStory() to check both:
    • First: stories map (by ID)
    • Then: skip array (by title+name)
  4. Precedence: stories map > skip array > story parameters

This gives us best of both worlds.