From af3cd07f5a97ce1d1232c5049de6fb7364729093 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 23 Feb 2026 16:21:54 +0100 Subject: [PATCH] :paperclip: Fix e2e tests --- frontend/playwright/ui/pages/WorkspacePage.js | 5 ++++- frontend/playwright/ui/specs/variants.spec.js | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/playwright/ui/pages/WorkspacePage.js b/frontend/playwright/ui/pages/WorkspacePage.js index 0aab8bdd4d..38775f3027 100644 --- a/frontend/playwright/ui/pages/WorkspacePage.js +++ b/frontend/playwright/ui/pages/WorkspacePage.js @@ -432,6 +432,8 @@ export class WorkspacePage extends BaseWebSocketPage { return content !== ""; }, { timeout: 1000 }); + await this.page.waitForTimeout(3000); + } /** @@ -445,7 +447,8 @@ export class WorkspacePage extends BaseWebSocketPage { await this.viewport.click({ button: "right" }); return this.page.getByText("Paste", { exact: true }).click(); } - return this.page.keyboard.press("ControlOrMeta+V"); + await this.page.keyboard.press("ControlOrMeta+V"); + await this.page.waitForTimeout(3000); } async panOnViewportAt(x, y, width, height) { diff --git a/frontend/playwright/ui/specs/variants.spec.js b/frontend/playwright/ui/specs/variants.spec.js index b053a2ca7d..d2bec45a57 100644 --- a/frontend/playwright/ui/specs/variants.spec.js +++ b/frontend/playwright/ui/specs/variants.spec.js @@ -383,24 +383,26 @@ test("User cut paste a component with path inside a variant", async ({ const variant = await findVariant(workspacePage, 0); - //Create a component + // Create a component await workspacePage.ellipseShapeButton.click(); await workspacePage.clickWithDragViewportAt(500, 500, 20, 20); await workspacePage.clickLeafLayer("Ellipse"); await workspacePage.page.keyboard.press("ControlOrMeta+k"); + await workspacePage.page.waitForTimeout(3000); - //Rename the component + // Rename the component await workspacePage.layers.getByText("Ellipse").dblclick(); await workspacePage.page .getByTestId("layer-item") .getByRole("textbox") .pressSequentially("button / hover"); await workspacePage.page.keyboard.press("Enter"); + await workspacePage.page.waitForTimeout(3000); - //Cut the component + // Cut the component await workspacePage.cut("keyboard"); - //Paste the component inside the variant + // Paste the component inside the variant await variant.container.click(); await workspacePage.paste("keyboard"); @@ -427,6 +429,7 @@ test("User drag and drop a component with path inside a variant", async ({ await workspacePage.clickWithDragViewportAt(500, 500, 20, 20); await workspacePage.clickLeafLayer("Ellipse"); await workspacePage.page.keyboard.press("ControlOrMeta+k"); + await workspacePage.page.waitForTimeout(3000); //Rename the component await workspacePage.layers.getByText("Ellipse").dblclick();