mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 19:53:48 +08:00
chore(editor): at menu stays open when left right arrow keys are pressed (#10806)
Close [BS-2644](https://linear.app/affine-design/issue/BS-2644/menu-support)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { test } from '@affine-test/kit/playwright';
|
||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import {
|
||||
clickNewPageButton,
|
||||
type,
|
||||
waitForEditorLoad,
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await clickNewPageButton(page);
|
||||
await waitForEditorLoad(page);
|
||||
});
|
||||
|
||||
test('at menu should not be close when press arrow key', async ({ page }) => {
|
||||
await page.keyboard.press('Enter');
|
||||
await type(page, '@');
|
||||
|
||||
const atMenu = page.locator('.linked-doc-popover');
|
||||
await expect(atMenu).toBeVisible();
|
||||
|
||||
await page.keyboard.press('ArrowRight');
|
||||
await expect(atMenu).toBeVisible();
|
||||
|
||||
await page.keyboard.press('ArrowLeft');
|
||||
await expect(atMenu).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user