fix(editor): repeat trigger keys of at-menu was added (#11631)

Close [BS-2716](https://linear.app/affine-design/issue/BS-2716/移动端通过toolpanel唤起的at-menu,出现两个)
This commit is contained in:
L-Sun
2025-04-13 06:46:37 +00:00
parent 26d2ed8afb
commit 076c5ba044
6 changed files with 61 additions and 71 deletions

View File

@@ -841,3 +841,21 @@ test('delete block by slash menu should remove children', async ({
await redoByKeyboard(page);
await assertRichTexts(page, ['123']);
});
test('should slash menu can trigger linked doc popover', async ({ page }) => {
await enterPlaygroundRoom(page);
await initEmptyParagraphState(page);
await focusRichText(page);
await type(page, '/linked');
await pressEnter(page);
await expect(page.locator('.linked-doc-popover')).toBeVisible();
await assertRichTexts(page, ['@']);
await type(page, 'doc');
await pressEnter(page);
await expect(page.locator('affine-reference')).toBeVisible();
await expect(
page.locator('affine-reference .affine-reference-title')
).toHaveText('doc');
});