Conversation
Add comprehensive visual regression tests for ButtonGroup component. This establishes a baseline before migrating from styled-components to CSS Modules. Includes: - Extended Storybook stories (15 total) covering all variants - 32 Playwright visual regression tests - Light and dark theme coverage - Selection, disabled, and layout state tests - Interactive state tests (hover, focus) - Accessibility tests
|
The explicit role=button was redundant since <button> elements already have an implicit button role. Removing it cleans up the DOM and avoids potential confusion with assistive technologies.
- Add aria-pressed assertion to borderless-selected test for parity - Add pressedButtons count assertion to multi-select borderless tests - Add dark theme coverage for interactive states (hover, focus)
Add page.locator('body').click() before Tab keypress in keyboard
navigation test to ensure keyboard events target page content
rather than browser chrome. Prevents flakiness in CI.
Add pressed button visibility checks to dark theme selection tests for parity with light theme counterparts.
… tests Ensures consistency between light and dark theme test setup. Light theme tests use getStoryUrl(..., 'light'), now dark theme tests also use getStoryUrl(..., 'dark') instead of relying on Playwright's colorScheme alone. This makes tests more resilient to Storybook default theme changes.
Add aria-label to Playground story for accessibility compliance. ARIA groups should have accessible names to describe their purpose to screen reader users. Also adds test to verify aria-label is present. Note: Component already supports aria-label via HTMLAttributes spread, this change adds it to the example story and includes a test for it.
Add tests verifying that buttons can be activated using Space and Enter keys when focused. This improves keyboard interaction coverage and ensures accessibility compliance for keyboard-only users.
- Replace hardcoded Storybook URL with getStoryUrl() utility
- Remove redundant use({ colorScheme: 'dark' }) calls since getStoryUrl
already controls theme via &globals=theme:dark parameter
The timeout's ok for now. Do ignore! |
|
Claude finished @punkbit's task in 2m 40s —— View job Great work on this PR — comprehensive visual regression coverage with light/dark, all variants, interactive states, and basic a11y checks. The cascade fix ( A couple of small things worth addressing: ♿ Accessibility
💡 Suggestions (non-blocking)
|
📚 Storybook Preview Deployed✅ Preview URL: https://click-aksqyzevz-clickhouse.vercel.app Built from commit: |
The |
Why?
Introduce visual regression tests for ButtonGroup, as a prerequisite for migrating styled components into CSS modules.
How?
Tickets?
N/A
Contribution checklist?
buildcommand runs locallyPreview?