mirror of
https://github.com/penpot/penpot.git
synced 2025-07-10 23:17:20 +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
|
@ -30,7 +30,7 @@ test("Renders a file with solid, gradient and image fills", async ({
|
|||
}) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockAsset(
|
||||
await workspace.mockFileMediaAsset(
|
||||
[
|
||||
"1ebcea38-f1bf-8101-8006-4c8fd68e7c84",
|
||||
"1ebcea38-f1bf-8101-8006-4c8f579da49c",
|
||||
|
@ -51,7 +51,7 @@ test("Renders a file with solid, gradient and image fills", async ({
|
|||
test("Renders a file with strokes", async ({ page }) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockAsset(
|
||||
await workspace.mockFileMediaAsset(
|
||||
[
|
||||
"202c1104-9385-81d3-8006-5074e4682cac",
|
||||
"202c1104-9385-81d3-8006-5074c50339b6",
|
||||
|
@ -69,3 +69,47 @@ test("Renders a file with strokes", async ({ page }) => {
|
|||
|
||||
await expect(workspace.canvas).toHaveScreenshot();
|
||||
});
|
||||
|
||||
test("Renders a file with mutliple strokes", async ({ page }) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockGetFile("render-wasm/get-file-multiple-strokes.json");
|
||||
|
||||
await workspace.goToWorkspace({
|
||||
id: "c0939f58-37bc-805d-8006-51cc78297208",
|
||||
pageId: "c0939f58-37bc-805d-8006-51cc78297209",
|
||||
});
|
||||
await workspace.waitForFirstRender();
|
||||
|
||||
await expect(workspace.canvas).toHaveScreenshot();
|
||||
});
|
||||
|
||||
test("Renders a file with shapes with multiple fills", async ({ page }) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockGetFile("render-wasm/get-file-multiple-fills.json");
|
||||
|
||||
await workspace.goToWorkspace({
|
||||
id: "c0939f58-37bc-805d-8006-51cd3a51c255",
|
||||
pageId: "c0939f58-37bc-805d-8006-51cd3a51c256",
|
||||
});
|
||||
await workspace.waitForFirstRender();
|
||||
|
||||
await expect(workspace.canvas).toHaveScreenshot();
|
||||
});
|
||||
|
||||
// TODO: update the screenshots for this test once Taiga #11325 is fixed
|
||||
// https://tree.taiga.io/project/penpot/task/11325
|
||||
test("Renders shapes taking into account blend modes", async ({ page }) => {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockGetFile("render-wasm/get-file-blend-modes.json");
|
||||
|
||||
await workspace.goToWorkspace({
|
||||
id: "c0939f58-37bc-805d-8006-51cdf8e18e76",
|
||||
pageId: "c0939f58-37bc-805d-8006-51cdf8e18e77",
|
||||
});
|
||||
await workspace.waitForFirstRender();
|
||||
|
||||
await expect(workspace.canvas).toHaveScreenshot();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue