test(core): edgeless shape e2e (#11446)

### TL;DR

Add Edgeless shape ai e2e tests.

### What Changed

- Add Edgeless shape make it real e2e
- Add Edgeless shape generate image e2e
- Fix Edgeless generate headings e2e
This commit is contained in:
yoyoyohamapi
2025-04-03 16:53:20 +00:00
parent 133be72ac2
commit 030af6f426
5 changed files with 102 additions and 47 deletions

View File

@@ -60,6 +60,22 @@ test.describe('AIAction/MakeItReal', () => {
expect(responses).toEqual(new Set(['insert-below']));
});
test('should support making the selected element to real in edgeless', async ({
page,
utils,
}) => {
const { makeItReal } = await utils.editor.askAIWithEdgeless(
page,
async () => {
await utils.editor.createShape(page, 'HelloWorld');
}
);
const { answer, responses } = await makeItReal();
await expect(answer.locator('iframe')).toBeVisible({ timeout: 30000 });
expect(responses).toEqual(new Set(['insert-below']));
});
test('should show chat history in chat panel', async ({ page, utils }) => {
const { makeItReal } = await utils.editor.askAIWithText(
page,