mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
🔧 Add helper utils to mock config flags for WasmWorkspacePage (e2e)
This commit is contained in:
parent
139d4ba13c
commit
fd6ff04e90
@ -10,7 +10,7 @@ export const WASM_FLAGS = [
|
||||
export class WasmWorkspacePage extends WorkspacePage {
|
||||
static async init(page) {
|
||||
await super.init(page);
|
||||
await WorkspacePage.mockConfigFlags(page, WASM_FLAGS);
|
||||
await WasmWorkspacePage.mockConfigFlags(page, WASM_FLAGS);
|
||||
|
||||
await page.addInitScript(() => {
|
||||
document.addEventListener("penpot:wasm:loaded", () => {
|
||||
@ -27,6 +27,14 @@ export class WasmWorkspacePage extends WorkspacePage {
|
||||
});
|
||||
}
|
||||
|
||||
static async mockConfigFlags(page, flags) {
|
||||
await super.mockConfigFlags(page, [...WASM_FLAGS, ...flags]);
|
||||
}
|
||||
|
||||
async mockConfigFlags(flags) {
|
||||
return WasmWorkspacePage.mockConfigFlags(this.page, flags);
|
||||
}
|
||||
|
||||
constructor(page) {
|
||||
super(page);
|
||||
this.canvas = page.getByTestId("canvas-wasm-shapes");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user