fix(editor): 新文档回到顶部 + 超链接用系统浏览器打开 + 链接气泡仅选中时弹出

This commit is contained in:
hunter-dev
2026-09-25 22:42:03 +08:00
parent dc1d6b43dd
commit 1e30abfac4
6 changed files with 49 additions and 2 deletions
@@ -46,7 +46,9 @@ test('FR-E6:链接气泡编辑(添加+移除)', async () => {
let html: string = await a.page.evaluate(() => document.querySelector('.ProseMirror')?.innerHTML ?? '');
expect(html).toContain('href="https://example.com"');
// 气泡只在「选中链接文字」时弹出(纯点击链接改为调用系统浏览器打开)
await a.page.locator('.ProseMirror a').click();
await a.page.keyboard.press('Control+A');
await expect(a.page.locator('.link-bubble')).toBeVisible({ timeout: 5000 });
await expect(a.page.locator('.link-bubble input')).toHaveValue('https://example.com');