test(react-toolbar): baseline hook tests + coverage gaps flagged in #35903#36021
Merged
layershifter merged 3 commits intomicrosoft:masterfrom Apr 21, 2026
Merged
Conversation
85de1e5 to
16216f7
Compare
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>
16216f7 to
5e27e3f
Compare
📊 Bundle size report✅ No changes found |
|
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>
5e27e3f to
0d4cab5
Compare
bsunderhus
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
useToolbar: assertsaria-orientationis absent on horizontal roots, and confirms Tabster arrow-navigation attributes are attached by the non-base hook.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