mirror of
https://github.com/penpot/penpot.git
synced 2025-07-08 22:47:17 +02:00
✨ Are more visual regression tests for wasm (#6702)
This commit is contained in:
parent
8c6a80829f
commit
b92e108205
20 changed files with 6935 additions and 10 deletions
|
@ -28,4 +28,25 @@ export class WasmWorkspacePage extends WorkspacePage {
|
|||
return window.wasmSetObjectsFinished;
|
||||
});
|
||||
}
|
||||
|
||||
static async mockGoogleFont(page, fontSlug, assetFilename, options = {}) {
|
||||
const url = new RegExp(`/internal/gfonts/font/${fontSlug}`);
|
||||
return await page.route(url, (route) =>
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
path: `playwright/data/${assetFilename}`,
|
||||
contentType: "application/font-ttf",
|
||||
...options,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
async mockGoogleFont(fontSlug, assetFilename, options) {
|
||||
return WasmWorkspacePage.mockGoogleFont(
|
||||
this.page,
|
||||
fontSlug,
|
||||
assetFilename,
|
||||
options,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue