Skip to content

test(chromatic): consolidate simple component snapshots #825 - #829

Open
mart-sessman wants to merge 1 commit into
rcfrom
test/825-chromatic-visual-test-stories
Open

mart-sessman wants to merge 1 commit into
rcfrom
test/825-chromatic-visual-test-stories

Conversation

@mart-sessman

Copy link
Copy Markdown
Contributor

Closes #825

Each of the 41 simple components in #825 now has one hidden VisualTest story holding its visual variants, and the meta turns Chromatic snapshots off for the docs stories. Docs stories render as before. Snapshotted stories go from 622 to 381.

Changes

  • New VisualTest story in each file, tagged !dev and !autodocs, with chromatic.disableSnapshot: false. Every block has a bold label so a diff is easy to place.
  • Kept as their own snapshots (responsive, open or sticky states):
    • button-group MobileDropdown
    • collapse InitiallyOpen
    • text-group Responsive
    • truncate ResponsiveMaxLength
    • ellipsis ResponsiveEnd
    • skeleton Responsive
    • progress-bar Responsive and Animated
    • breadcrumbs ResponsiveVariant
    • tabs OverflowBehavior
    • table-of-contents StickyInLayout, Collapsible and CollapsibleHideOnScroll
    • pagination ResponsiveAlign and ResponsiveVisibility
    • checkbox VerticalTree (it sets its state with a timer)
  • Behaviour-only stories are no longer snapshotted (they look the same as Default):
    • accordion AccordionBehavior, HashDeepLinking and SemanticHeadings
    • text-field and textarea ClearButtonOnInteraction
    • skeleton Accessibility
    • horizontal-stepper ClickToNavigate and ExternalNavigation
  • Inside the composites:
    • ids, radio names and landmark labels are unique
    • pseudo states use distinct selectors
    • inverted variants sit on a bg bg-primary panel instead of the global brand background
  • Contributing skill: stories.md documents the pattern and adds a checklist line: a new visual story on a component with VisualTest must also add its variant there.

Checked locally

  • Storybook builds.
  • The test-runner (render and a11y) passes every tedi story, including all 41 VisualTest stories. The only failures are in untouched community stories.
  • Every VisualTest story renders in Playwright with no console errors and no duplicate ids.

The first Chromatic build after merge will show the new VisualTest snapshots as additions; accepting them sets the new baseline.

React counterpart: TEDI-Design-System/react#1050

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between d86bf8c and e1e5ce2.

Files selected for processing: 42
  • .claude/skills/contributing/references/stories.md
  • src/tedi/components/base/icon/icon.stories.ts
  • src/tedi/components/base/text/text.stories.ts
  • src/tedi/components/buttons/button-group/button-group.stories.ts
  • src/tedi/components/buttons/button/button.stories.ts
  • src/tedi/components/buttons/card-button/card-button.stories.ts
  • src/tedi/components/buttons/closing-button/closing-button.stories.ts
  • src/tedi/components/buttons/collapse-button/collapse-button.stories.ts
  • src/tedi/components/buttons/floating-button/floating-button.stories.ts
  • src/tedi/components/buttons/info-button/info-button.stories.ts
  • src/tedi/components/content/accordion/accordion.stories.ts
  • src/tedi/components/content/collapse/collapse.stories.ts
  • src/tedi/components/content/empty-state/empty-state.stories.ts
  • src/tedi/components/content/heading-with-icon/heading-with-icon.stories.ts
  • src/tedi/components/content/label/label.stories.ts
  • src/tedi/components/content/list/list.stories.ts
  • src/tedi/components/content/text-group/text-group.stories.ts
  • src/tedi/components/content/truncate/truncate.stories.ts
  • src/tedi/components/form/checkbox/checkbox.stories.ts
  • src/tedi/components/form/feedback-text/feedback-text.stories.ts
  • src/tedi/components/form/number-field/number-field.stories.ts
  • src/tedi/components/form/radio/radio.stories.ts
  • src/tedi/components/form/text-field/text-field.stories.ts
  • src/tedi/components/form/textarea/textarea.stories.ts
  • src/tedi/components/form/toggle/toggle.stories.ts
  • src/tedi/components/helpers/attachment/attachment.stories.ts
  • src/tedi/components/helpers/ellipsis/ellipsis.stories.ts
  • src/tedi/components/helpers/separator/separator.stories.ts
  • src/tedi/components/helpers/timeline/timeline.stories.ts
  • src/tedi/components/loader/progress-bar/progress-bar.stories.ts
  • src/tedi/components/loader/skeleton/skeleton.stories.ts
  • src/tedi/components/loader/spinner/spinner.stories.ts
  • src/tedi/components/navigation/breadcrumbs/breadcrumbs.stories.ts
  • src/tedi/components/navigation/horizontal-stepper/horizontal-stepper.stories.ts
  • src/tedi/components/navigation/link/link.stories.ts
  • src/tedi/components/navigation/pagination/pagination.stories.ts
  • src/tedi/components/navigation/table-of-contents/table-of-contents.stories.ts
  • src/tedi/components/navigation/tabs/tabs.stories.ts
  • src/tedi/components/notifications/alert/alert.stories.ts
  • src/tedi/components/tags/status-badge/status-badge.stories.ts
  • src/tedi/components/tags/status-indicator/status-indicator.stories.ts
  • src/tedi/components/tags/tag/tag.stories.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

♿ Accessibility — ✅ no blocking violations

No accessibility violations in the components changed by this PR.

🔕 Known issues — 20 stories marked todo (warn only)

Stories

@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

},
styles: [".icon-vt-inherit { font-size: 60px; }"],
template: `
<tedi-row [cols]="1" [gapY]="5">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moduleMetadata is missing RowComponent and ColComponent, so the VisualTest grid doesn't render.

render: () => ({
props: { ...ITEM_STATES_PROPS, separator: false },
template: `
<tedi-row [cols]="1" [gapY]="4">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as Icon: RowComponent and ColComponent aren't imported, so this layout renders without the grid.

* `md`, full trail from `md` up — resize the viewport to see it switch.
*/
export const ResponsiveVariant: Story = {
parameters: { chromatic: { disableSnapshot: false } },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: same as on the React PR, the responsive stories kept as separate snapshots (this one, Pagination ResponsiveAlign/ResponsiveVisibility, Responsive etc.) have no viewport, so they're only captured at desktop width. Either add viewports: [375, 1280], or move them into VisualTest.

This branch was previously deployed

1 inactive deployment
github-pages — e1e5ce2d Deployed Nov 2, 2026 by mart-sessman via Deploy #1358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chromatic: consolidate simple components into one snapshot story each

2 participants