fix(core): disable space ai guidance for non-paragraph block (#11847)
### TL;DR Disable space ai guidance for non-paragraph block > CLOSE AI-67
This commit is contained in:
1 parent
1efcd480af
commit
f65c8f8fa6
2 files changed
+26
-1
No files matched your search
@@ -15,4 +15,24 @@ test.describe('AIBasic/Guidance', () => {
|
||||
await page.keyboard.press('Space');
|
||||
await expect(page.locator('affine-ai-panel-widget')).toBeVisible();
|
||||
});
|
||||
|
||||
test('should not show AI panel when space is pressed on non-empty paragraph', async ({
|
||||
page,
|
||||
utils,
|
||||
}) => {
|
||||
await utils.editor.focusToEditor(page);
|
||||
await page.keyboard.insertText('HelloWorld');
|
||||
await page.keyboard.press('Space');
|
||||
await expect(page.locator('affine-ai-panel-widget')).not.toBeVisible();
|
||||
});
|
||||
|
||||
test('should not show AI panel when space is pressed on non-paragraph block', async ({
|
||||
page,
|
||||
utils,
|
||||
}) => {
|
||||
await utils.editor.focusToEditor(page);
|
||||
await page.keyboard.insertText('```js');
|
||||
await page.keyboard.press('Enter');
|
||||
await expect(page.locator('affine-ai-panel-widget')).not.toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user