mirror of
https://github.com/penpot/penpot.git
synced 2025-07-31 01:08:23 +02:00
🔧 Add initial snapshots
This commit is contained in:
parent
1a10b7ebfd
commit
479406b884
7 changed files with 1241 additions and 2 deletions
2
frontend/.gitignore
vendored
2
frontend/.gitignore
vendored
|
@ -11,4 +11,4 @@ node_modules/
|
||||||
/blob-report/
|
/blob-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
/playwright/**/visual-specs/**/*.png
|
/playwright/**/visual-specs/**/*.png
|
||||||
/playwright/**/render-wasm-specs/**/*.png
|
|
||||||
|
|
|
@ -61,8 +61,11 @@ export default defineConfig({
|
||||||
deviceScaleFactor: 2,
|
deviceScaleFactor: 2,
|
||||||
},
|
},
|
||||||
testDir: "./playwright/ui/render-wasm-specs",
|
testDir: "./playwright/ui/render-wasm-specs",
|
||||||
|
snapshotPathTemplate: "{testDir}/{testFilePath}-snapshots/{arg}.png",
|
||||||
expect: {
|
expect: {
|
||||||
toHaveScreenshot: { maxDiffPixelRatio: 0.005 },
|
toHaveScreenshot: {
|
||||||
|
maxDiffPixelRatio: 0.005,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
1210
frontend/playwright/data/render-wasm/get-file-shapes-strokes.json
Normal file
1210
frontend/playwright/data/render-wasm/get-file-shapes-strokes.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -48,3 +48,29 @@ test("Renders a file with solid, gradient and image fills", async ({
|
||||||
|
|
||||||
await expect(workspace.canvas).toHaveScreenshot();
|
await expect(workspace.canvas).toHaveScreenshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("Renders a file with strokes", async ({ page }) => {
|
||||||
|
const workspace = new WasmWorkspacePage(page);
|
||||||
|
await workspace.setupEmptyFile();
|
||||||
|
await workspace.mockAsset(
|
||||||
|
"202c1104-9385-81d3-8006-5074e4682cac",
|
||||||
|
"render-wasm/assets/penguins.jpg",
|
||||||
|
);
|
||||||
|
await workspace.mockAsset(
|
||||||
|
"202c1104-9385-81d3-8006-5074c50339b6",
|
||||||
|
"render-wasm/assets/penguins.jpg",
|
||||||
|
);
|
||||||
|
await workspace.mockAsset(
|
||||||
|
"202c1104-9385-81d3-8006-507560ce29e3",
|
||||||
|
"render-wasm/assets/penguins.jpg",
|
||||||
|
);
|
||||||
|
await workspace.mockGetFile("render-wasm/get-file-shapes-strokes.json");
|
||||||
|
|
||||||
|
await workspace.goToWorkspace({
|
||||||
|
id: "202c1104-9385-81d3-8006-507413ff2c99",
|
||||||
|
pageId: "202c1104-9385-81d3-8006-507413ff2c9a",
|
||||||
|
});
|
||||||
|
await workspace.waitForFirstRender();
|
||||||
|
|
||||||
|
await expect(workspace.canvas).toHaveScreenshot();
|
||||||
|
});
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
Binary file not shown.
After Width: | Height: | Size: 169 KiB |
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
Loading…
Add table
Add a link
Reference in a new issue