Repository navigation
test(desktop): fix inline code/math shortcut tests failing on develop after #4611 - #4624
Merged
Jocs merged 1 commit intoJun 21, 2026
Merged
Conversation
…4611 marktext#4611 corrected the inline format toolbar labels to match the real keybindings (inline code Ctrl+`, inline math Shift+Ctrl+M), but the characterization tests in format-menu-state.spec.ts still asserted the old, buggy Ctrl+E / Shift+Ctrl+E toolbar values, so they fail on develop. Bring the tests in line with the corrected behavior: - inline_math now agrees with the Format menu on Windows and Linux, so it moves into the reconcilable (matches) set. - inline_code now matches on Windows (Ctrl+`); Linux intentionally binds Ctrl+Y, so the remaining Linux-only divergence is what the test pins.
2 of 5 tasks
Jocs
approved these changes
Jun 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
The
Test / testCI job currently fails ondevelop(and therefore on every open PR). The two failing cases are the inline-code / inline-math "DIVERGES" characterization tests intest/unit/specs/format-menu-state.spec.ts.They were pinning a known bug where the muya inline-format toolbar advertised
Ctrl+E/Shift+Ctrl+Efor inline code / inline math even though no platform bound those keys. #4611 fixed that bug — the toolbar now shows the real defaults (Ctrl+\`` for inline code,Shift+Ctrl+M` for inline math) — but the tests weren't updated, so they still assert the old values and fail.This updates the tests to the corrected behavior:
Ctrl+Shift+M), so it moves into the reconcilable ("matches") set.Ctrl+\``); Linux intentionally bindsCtrl+Y` (noted in fix(muya): correct inline code/math shortcut labels in the format toolbar #4611 / 选中文字时的弹出选项快捷键和快捷键设置中的不统一 #3630), so the test is rewritten to pin that remaining Linux-only divergence instead of the old both-platforms divergence.Values were read from source, not guessed: toolbar
packages/muya/src/ui/inlineFormatToolbar/config.ts, keybindingskeybindingsWindows.ts/keybindingsLinux.ts.Type of change
develop)Test plan
pnpm run test:unit— full desktop unit suite green (642 tests; the 2 previously-failing cases now pass).pnpm run lintandpnpm run typecheckpass.Notes for reviewers [optional]
Pure test change, no production code touched. Related: #4611.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.