fix(core): cannot space inside ai panel input (#12167)

### TL;DR

fix: cannot space inside ai panel input

> CLOSE BS-3428
This commit is contained in:
yoyoyohamapi
2025-05-07 07:46:13 +00:00
parent 8ea39d5438
commit 3afecc0605
2 changed files with 19 additions and 1 deletions

View File

@@ -51,4 +51,21 @@ test.describe('AIBasic/Guidance', () => {
expect(content).toBe(' ');
}).toPass({ timeout: 5000 });
});
test('should support text with space in ai panel input', async ({
page,
utils,
}) => {
await utils.editor.focusToEditor(page);
await page.keyboard.press('Space');
await expect(page.locator('affine-ai-panel-widget')).toBeVisible();
await page.keyboard.insertText('Hello');
await page.keyboard.press('Space');
await page.keyboard.insertText('World');
await expect(async () => {
const input = await page.locator('ai-panel-input textarea');
expect(await input.inputValue()).toBe('Hello World');
}).toPass({ timeout: 5000 });
});
});