diff --git a/frontend/playwright/ui/pages/WasmWorkspacePage.js b/frontend/playwright/ui/pages/WasmWorkspacePage.js index 07ad4f5fe9..8d3c3aec62 100644 --- a/frontend/playwright/ui/pages/WasmWorkspacePage.js +++ b/frontend/playwright/ui/pages/WasmWorkspacePage.js @@ -21,14 +21,24 @@ export class WasmWorkspacePage extends WorkspacePage { this.canvas = page.getByTestId("canvas-wasm-shapes"); } - async waitForFirstRender() { + async waitForFirstRender(config = {}) { + const options = { hideUI: true, ...config }; + await expect(this.pageName).toHaveText("Page 1"); + if (options.hideUI) { + await this.hideUI(); + } await this.canvas.waitFor({ state: "visible" }); await this.page.waitForFunction(() => { return window.wasmSetObjectsFinished; }); } + async hideUI() { + await this.page.keyboard.press("\\"); + await expect(this.pageName).not.toBeVisible(); + } + static async mockGoogleFont(page, fontSlug, assetFilename, options = {}) { const url = new RegExp(`/internal/gfonts/font/${fontSlug}`); return await page.route(url, (route) => diff --git a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-basic-shapes-boards-and-groups-1.png b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-basic-shapes-boards-and-groups-1.png index 9408db4099..9b5b85e2ef 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-basic-shapes-boards-and-groups-1.png and b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-basic-shapes-boards-and-groups-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-mutliple-strokes-1.png b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-mutliple-strokes-1.png index 2e2d21b9a2..190080ea67 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-mutliple-strokes-1.png and b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-mutliple-strokes-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-shapes-with-multiple-fills-1.png b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-shapes-with-multiple-fills-1.png index d0f1076bc4..48d946bb29 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-shapes-with-multiple-fills-1.png and b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-shapes-with-multiple-fills-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-solid-gradient-and-image-fills-1.png b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-solid-gradient-and-image-fills-1.png index 0fb3e44e1b..af62b526aa 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-solid-gradient-and-image-fills-1.png and b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-solid-gradient-and-image-fills-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-strokes-1.png b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-strokes-1.png index 82fd5add81..75fcbc4f8e 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-strokes-1.png and b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-a-file-with-strokes-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-shapes-taking-into-account-blend-modes-1.png b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-shapes-taking-into-account-blend-modes-1.png index 6168df22e7..2ebb4c7a5e 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-shapes-taking-into-account-blend-modes-1.png and b/frontend/playwright/ui/render-wasm-specs/shapes.spec.js-snapshots/Renders-shapes-taking-into-account-blend-modes-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js b/frontend/playwright/ui/render-wasm-specs/texts.spec.js index ea72c927cb..f9f850d352 100644 --- a/frontend/playwright/ui/render-wasm-specs/texts.spec.js +++ b/frontend/playwright/ui/render-wasm-specs/texts.spec.js @@ -31,12 +31,16 @@ test("Updates a text font", async ({ page }) => { id: "3b0d758a-8c9d-8013-8006-52c8337e5c72", pageId: "3b0d758a-8c9d-8013-8006-52c8337e5c73", }); - await workspace.waitForFirstRender(); + await workspace.waitForFirstRender({ hideUI: false }); + await workspace.clickLeafLayer("this is a text"); const fontStyle = workspace.page.getByTitle("Font Style"); await fontStyle.click(); const boldOption = fontStyle.getByText("bold").first(); await boldOption.click(); + + await workspace.hideUI(); + await expect(workspace.canvas).toHaveScreenshot(); }); diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-styled-texts-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-styled-texts-1.png index 40d747df90..c854e58ecc 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-styled-texts-1.png and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-styled-texts-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-1.png index 66e649b523..85986cc5eb 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-1.png and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-custom-fonts-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-custom-fonts-1.png index d68867cf91..c56e2ec4d0 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-custom-fonts-1.png and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-custom-fonts-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-google-fonts-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-google-fonts-1.png index 86ae00eb3e..c6457725f0 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-google-fonts-1.png and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Renders-a-file-with-texts-that-use-google-fonts-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-a-text-font-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-a-text-font-1.png index d6eca5da99..0c9ad23039 100644 Binary files a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-a-text-font-1.png and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-a-text-font-1.png differ