Skip to content

test(SplitButton): 💍 visual regression#992

Open
punkbit wants to merge 12 commits intomainfrom
test/splitbutton-visual-regression
Open

test(SplitButton): 💍 visual regression#992
punkbit wants to merge 12 commits intomainfrom
test/splitbutton-visual-regression

Conversation

@punkbit
Copy link
Copy Markdown
Contributor

@punkbit punkbit commented Apr 14, 2026

Why?

Introduce visual regression tests for SplitButton, as a prerequisite for migrating styled components into CSS modules.

⚠️ TODO: Due to "accessibility" changes, do include a changeset

How?

  • Extend SplitButton storybook stories
  • Introduce IconButton test spec for visual regression
  • Store snapshots

Contribution checklist?

  • You've done enough research before writing
  • You have reviewed the PR
  • The commit messages are detailed
  • The build command runs locally
  • Assets or static content are linked and stored in the project
  • For documentation, guides or references, you've tested the commands

Preview?

Screenshot 2026-04-14 at 16 23 53

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 14, 2026

⚠️ No Changeset found

Latest commit: a734c23

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ClickHouse ClickHouse deleted a comment from github-actions Bot Apr 14, 2026
@ClickHouse ClickHouse deleted a comment from github-actions Bot Apr 14, 2026
@ClickHouse ClickHouse deleted a comment from github-actions Bot Apr 14, 2026
@ClickHouse ClickHouse deleted a comment from github-actions Bot Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Claude finished @punkbit's task in 1m 4s —— View job


PR Review

Both must-fix items from the previous review have been addressed. ✅


Previous must-fix items — resolved:

  • Keyboard navigation test (splitbutton.spec.ts:310–312) — now uses primaryButton.focus() + primaryButton.press('Enter') directly. No longer relies on Tab order in the Storybook iframe.
  • aria-disabled on dropdown trigger in disabled tests — all four disabled visual tests (light/dark × primary/secondary) now assert aria-disabled="true" on both primaryButton and dropdownTrigger.

SplitButton.tsx changes look correct:

  • aria-disabled={disabled || undefined} on both PrimaryButton and SecondaryButton matches CONVENTIONS.md requirement ("Disabled states need both disabled prop AND aria-disabled="true"").
  • The || undefined pattern correctly omits the attribute when not disabled — no spurious aria-disabled="false" on the DOM.

💡 Suggestions (non-blocking, carry-over from previous review)

  • splitbutton.spec.ts:78,111,214,242page.waitForTimeout(100) works but is a fixed delay. Consider { animations: 'disabled' } in toHaveScreenshot options for deterministic animation settling.
  • SplitButton.tsx:235,259PrimaryButton uses &:disabled while SecondaryButton uses &[data-disabled] (set by Radix). A short comment here would help future CSS Modules migration, since the disabled style source differs between the two.

✅ Looks great overall — solid test coverage across themes, variants, and states. Ready to merge!

@workflow-authentication-public
Copy link
Copy Markdown
Contributor

📚 Storybook Preview Deployed

✅ Preview URL: https://click-q8thsoeu3-clickhouse.vercel.app

Built from commit: 01c5a96bfe0512d483d50b6ef60f19caa2ab14ed

@ClickHouse ClickHouse deleted a comment from github-actions Bot Apr 14, 2026
@punkbit punkbit marked this pull request as ready for review April 14, 2026 16:44
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.

2 participants