feat(M9): FR-K1/K3/K4/K6/K7 快捷键体系——多作用域(global/app/editor)+Scope.resolveActive 裁决(K1); 编辑器类绑定 find/bold/italic/strike/inlineCode/clearFormat(K3); 冲突数量汇总 conflictCount+SettingsPanel 顶部警示(K4); CheatSheet 从 store 动态渲染+formatCombo Mac 适配(K6); Ctrl+F 捕获阶段 keydown 拦截宿主查找+FindReplace 切换(K7); keymap-enhanced E2E 2 项

This commit is contained in:
hunter-dev
2026-08-26 14:43:57 +08:00
parent fcd822b9f4
commit bfb1f4b014
8 changed files with 217 additions and 29 deletions
@@ -71,6 +71,8 @@ test('FR-E11:查找高亮 + 替换 + 全部替换', async () => {
await a.page.locator('.ProseMirror').click();
await a.page.keyboard.type('foo bar foo baz foo');
// FR-K7:Ctrl+F 呼出查找替换面板
await a.page.keyboard.press('Control+f');
await a.page.getByPlaceholder('查找').fill('foo');
await a.page.getByRole('button', { name: '查找' }).click();
await expect(a.page.locator('.ProseMirror .find-match')).toHaveCount(3, { timeout: 5000 });
@@ -104,6 +106,8 @@ test('FR-E11:整词 + 区分大小写选项', async () => {
await a.page.locator('.ProseMirror').click();
await a.page.keyboard.type('foo foobar foo');
// FR-K7:Ctrl+F 呼出查找替换面板
await a.page.keyboard.press('Control+f');
await a.page.getByPlaceholder('查找').fill('foo');
await a.page.getByRole('button', { name: '查找' }).click();
await expect(a.page.locator('.ProseMirror .find-match')).toHaveCount(3, { timeout: 5000 });