diff --git a/frontend/playwright/ui/pages/WorkspacePage.js b/frontend/playwright/ui/pages/WorkspacePage.js index 741c892111..a9d6e1d939 100644 --- a/frontend/playwright/ui/pages/WorkspacePage.js +++ b/frontend/playwright/ui/pages/WorkspacePage.js @@ -383,7 +383,8 @@ export class WorkspacePage extends BaseWebSocketPage { await this.page.keyboard.press("T"); await this.page.waitForTimeout(timeToWait); await this.clickAndMove(x1, y1, x2, y2); - await this.page.waitForTimeout(timeToWait); + await expect(this.page.getByTestId("text-editor")).toBeVisible(); + if (initialText) { await this.page.keyboard.type(initialText); } @@ -433,7 +434,7 @@ export class WorkspacePage extends BaseWebSocketPage { async paste(kind = "keyboard") { if (kind === "context-menu") { await this.viewport.click({ button: "right" }); - return this.page.getByText("PasteCtrlV").click(); + return this.page.getByText("Paste", { exact: true }).click(); } return this.page.keyboard.press("ControlOrMeta+V"); } diff --git a/frontend/playwright/ui/specs/text-editor-v2.spec.js b/frontend/playwright/ui/specs/text-editor-v2.spec.js index cc6061f192..26c62a6825 100644 --- a/frontend/playwright/ui/specs/text-editor-v2.spec.js +++ b/frontend/playwright/ui/specs/text-editor-v2.spec.js @@ -5,7 +5,7 @@ import { WorkspacePage } from "../pages/WorkspacePage"; const timeToWait = 100; test.beforeEach(async ({ page, context }) => { - await Clipboard.enable(context, Clipboard.Permission.ONLY_WRITE); + await Clipboard.enable(context, Clipboard.Permission.ALL); await WorkspacePage.init(page); await WorkspacePage.mockConfigFlags(page, ["enable-feature-text-editor-v2"]); diff --git a/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs b/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs index 909ba2eca7..98e82162e2 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs @@ -401,7 +401,8 @@ (dm/fmt "scale(%)" maybe-zoom))}))] [:g.text-editor {:clip-path (dm/fmt "url(#%)" clip-id) - :transform (dm/str transform)} + :transform (dm/str transform) + :data-testid "text-editor"} [:defs [:clipPath {:id clip-id} [:rect {:x x :y y :width width :height height}]]]