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:
parent
8c337f508b
commit
59a4b51d2c
10 changed files with 2256 additions and 8 deletions
frontend/playwright/ui/pages
24
frontend/playwright/ui/pages/WasmWorkspacePage.js
Normal file
24
frontend/playwright/ui/pages/WasmWorkspacePage.js
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue