Fix stale ShortcutManager numpad-operator test#11572
Merged
Merged
Conversation
The test expected numpad +, -, *, / to produce "NumPad"-prefixed names
("NumPadAdd" etc.), but commit 00a8dc1 deliberately changed
GetShortcutKeyName to return the bare Key names ("Add", "Subtract",
"Multiply", "Divide") for these four keys — they're unaffected by NumLock
and prefixing them broke matching against the Avalonia Key names used by
default shortcuts (e.g. Shift+Add waveform zoom). The InlineData rows were
never updated, so the test had been failing since that change.
Update the four expectations to the bare names to match the intended,
documented behavior.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
ShortcutManagerTests.GetShortcutKeyNameDifferentiatesNumpadhad fourInlineDatarows that had been failing since 2026-06-12:Cause
Commit
00a8dc176("Fix numpad +,-,*,/ shortcut keys not matching") deliberately changedShortcutManager.GetShortcutKeyNameto return the bare Key names for the four numpad arithmetic operators — they're unaffected by NumLock, have no main-keyboard equivalent, and prefixing them broke matching against the Avalonia Key names used by default shortcuts (e.g. Shift+Add waveform zoom). That commit also added a legacy-migration map converting old"NumPadAdd"tokens back to"Add".The test's expectations (last touched in the earlier commit
228bae062) were never updated, so they contradicted the intended behavior.Fix
Test-only change: update the four expectations to the bare names and add a comment explaining why the operators differ from other numpad keys. The production code is correct and unchanged.
All 343 UI tests pass.
🤖 Generated with Claude Code