Repository navigation
test(chromatic): consolidate simple component snapshots #825 - #829
mart-sessman wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou'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. View limit details
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. |
♿ Accessibility — ✅ no blocking violationsNo accessibility violations in the components changed by this PR. 🔕 Known issues — 20 stories marked
|
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"> |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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 } }, |
There was a problem hiding this comment.
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.
Closes #825
Each of the 41 simple components in #825 now has one hidden
VisualTeststory 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
VisualTeststory in each file, tagged!devand!autodocs, withchromatic.disableSnapshot: false. Every block has a bold label so a diff is easy to place.MobileDropdownInitiallyOpenResponsiveResponsiveMaxLengthResponsiveEndResponsiveResponsiveandAnimatedResponsiveVariantOverflowBehaviorStickyInLayout,CollapsibleandCollapsibleHideOnScrollResponsiveAlignandResponsiveVisibilityVerticalTree(it sets its state with a timer)AccordionBehavior,HashDeepLinkingandSemanticHeadingsClearButtonOnInteractionAccessibilityClickToNavigateandExternalNavigationnames and landmark labels are uniquebg bg-primarypanel instead of the global brand backgroundstories.mddocuments the pattern and adds a checklist line: a new visual story on a component withVisualTestmust also add its variant there.Checked locally
VisualTeststories. The only failures are in untouched community stories.VisualTeststory renders in Playwright with no console errors and no duplicate ids.The first Chromatic build after merge will show the new
VisualTestsnapshots as additions; accepting them sets the new baseline.React counterpart: TEDI-Design-System/react#1050