Skip to content

test(react-toolbar): baseline hook tests + coverage gaps flagged in #35903#36021

Merged
layershifter merged 3 commits intomicrosoft:masterfrom
layershifter:review/35903-tests
Apr 21, 2026
Merged

test(react-toolbar): baseline hook tests + coverage gaps flagged in #35903#36021
layershifter merged 3 commits intomicrosoft:masterfrom
layershifter:review/35903-tests

Conversation

@layershifter
Copy link
Copy Markdown
Member

@layershifter layershifter commented Apr 21, 2026

Summary

Companion to #35903. Isolates the hook-level test additions from that PR as a master-passing baseline, plus fills the two coverage gaps flagged during review.

Why

These tests are useful independent of #35903 — they pin existing behavior so that the refactor in #35903 produces a reviewable diff. Any assertion that needs updating there surfaces a behavior change worth discussing.

🤖 Generated with Claude Code

@layershifter layershifter force-pushed the review/35903-tests branch 2 times, most recently from 85de1e5 to 16216f7 Compare April 21, 2026 08:56
Cherry-picks the test files from PR microsoft#35903 (excluding production code
changes). Two ToolbarToggleButton assertions are adjusted to match
current master behavior rather than the PR's fixed behavior — these
document the spread-order bug where useToggleButton_unstable's
'secondary' default overrides the toolbar's 'subtle' default and
suppresses user-supplied appearance. When the PR code lands, these
assertions will need flipping, signalling the behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

Adds the useToolbar test cases flagged during review of PR microsoft#35903:

- `aria-orientation` is omitted on the root when the toolbar is
  horizontal.
- The non-base hook wires Tabster arrow-navigation attributes onto the
  root; locked via inline snapshot so any upstream config change shows
  up in the diff.

Size/shape overrides on ToolbarButton were considered but dropped —
ToolbarButtonProps doesn't expose either prop, so asserting their
runtime behavior would only pin implementation detail for an API that
cannot be reached from TypeScript.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@layershifter layershifter marked this pull request as ready for review April 21, 2026 09:45
@layershifter layershifter requested review from a team and chpalac as code owners April 21, 2026 09:45
@layershifter layershifter merged commit 147cdfa into microsoft:master Apr 21, 2026
12 checks passed
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