mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-19 02:51:47 +08:00
fix(editor): should clear selection when switching doc mode (#11545)
Closes: [BS-3050](https://linear.app/affine-design/issue/BS-3050/切换模式时,清除选区)
This commit is contained in:
@@ -353,3 +353,20 @@ test('Dropdown menus should be closed automatically when toolbar is displayed',
|
||||
await expect(toolbar).toBeVisible();
|
||||
await expect(moreMenu).toBeHidden();
|
||||
});
|
||||
|
||||
test('should clear selection when switching doc mode', async ({ page }) => {
|
||||
await page.keyboard.press('Enter');
|
||||
|
||||
await page.keyboard.type('hello world');
|
||||
await page.keyboard.press('Shift+ArrowLeft');
|
||||
await page.keyboard.press('Shift+ArrowLeft');
|
||||
await page.keyboard.press('Shift+ArrowLeft');
|
||||
|
||||
const toolbar = locateToolbar(page);
|
||||
|
||||
await expect(toolbar).toBeVisible();
|
||||
|
||||
await clickEdgelessModeButton(page);
|
||||
|
||||
await expect(toolbar).toBeHidden();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user