test(core): add missing await for expect (#11900)

This commit is contained in:
L-Sun
2025-04-23 04:55:18 +00:00
parent b1aecfc1c4
commit 9baef237f2
20 changed files with 93 additions and 105 deletions

View File

@@ -31,7 +31,7 @@ test.describe('AIInsertion/SaveAsDoc', () => {
const { actions, content } =
await utils.chatPanel.getLatestAssistantMessage(page);
await actions.saveAsDoc();
await page.getByText('New doc created');
await page.getByText('New doc created').waitFor({ state: 'visible' });
// Verify the ai block is created
const editorContent = await utils.editor.getEditorContent(page);
@@ -63,7 +63,7 @@ test.describe('AIInsertion/SaveAsDoc', () => {
const { actions, content } =
await utils.chatPanel.getLatestAssistantMessage(page);
await actions.saveAsDoc();
await page.getByText('New doc created');
await page.getByText('New doc created').waitFor({ state: 'visible' });
// Switch to page mode
await utils.editor.isPageMode(page);