From 13fe22d72ba88ceb3373992e7aeed16a37892965 Mon Sep 17 00:00:00 2001 From: Nathan Panchout Date: Tue, 30 Jun 2026 15:44:22 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85(frontend)=20wait=20for=20editor=20mou?= =?UTF-8?q?nt=20in=20createDoc=20e2e=20helper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts b/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts index 24b2c0b88..005007e3d 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts @@ -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; };