✅(frontend) wait for editor mount in createDoc e2e helper

createDoc returned before the ProseMirror editor was visible, so tests
that immediately typed or opened the presenter raced the load. Wait for
the editor container before handing control back.
This commit is contained in:
Nathan Panchout
2026-07-01 13:09:35 +02:00
parent 6ec541f5cb
commit 13fe22d72b
@@ -180,6 +180,12 @@ export const createDoc = async (
expect(responseUpdateDoc.ok()).toBeTruthy();
}
// Wait for the editor to be mounted before handing control back, so callers
// that immediately type or open features don't race the editor load.
await expect(
page.locator('.--docs--editor-container .ProseMirror'),
).toBeVisible({ timeout: 10000 });
return randomDocs;
};