1
0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-08-12 00:26:44 +02:00

🔧 Set up playwright project for render wasm

This commit is contained in:
Belén Albeza 2025-06-05 16:27:57 +02:00
commit 59a4b51d2c
10 changed files with 2256 additions and 8 deletions
frontend/playwright/ui/pages

View file

@ -0,0 +1,24 @@
import { expect } from "@playwright/test";
import { WorkspacePage } from "./WorkspacePage";
export class WasmWorkspacePage extends WorkspacePage {
static async init(page) {
await super.init(page);
await WorkspacePage.mockConfigFlags(page, [
"enable-feature-render-wasm",
"enable-render-wasm-dpr",
]);
}
constructor(page) {
super(page);
this.canvas = page.getByTestId("canvas-wasm-shapes");
}
async waitForCanvasRender() {
// FIXME: temp workaround. We will need to wait for set-objects to fully finish
await expect(this.pageName).toHaveText("Page 1");
await this.canvas.waitFor({ state: "visible" });
await this.page.waitForTimeout(3000);
}
}