AI-native design editor. Open-source Figma alternative.
Skip stability check: toMatchSnapshot, 2.1s → 1.3s
Danila Poyarkovc1fbf57df26f
diff --git a/playwright.config.ts b/playwright.config.tsindex 31b6487a9..75981f58b 100644--- a/playwright.config.ts+++ b/playwright.config.ts@@ -7,6 +7,10 @@ export default defineConfig({toHaveScreenshot: {maxDiffPixelRatio: 0.01,threshold: 0.3+ },+ toMatchSnapshot: {+ maxDiffPixelRatio: 0.01,+ threshold: 0.3}},use: {diff --git a/tests/e2e/create-shapes.spec.ts b/tests/e2e/create-shapes.spec.tsindex c143ef31f..a1081f742 100644--- a/tests/e2e/create-shapes.spec.ts+++ b/tests/e2e/create-shapes.spec.ts@@ -22,18 +22,23 @@ test.beforeEach(async () => {await canvas.clearCanvas()})+async function expectCanvas(name: string) {+ const buffer = await canvas.canvas.screenshot()+ expect(buffer).toMatchSnapshot(`${name}.png`)+}+test('empty canvas', async () => {- await expect(canvas.canvas).toHaveScreenshot({ timeout: 3000 })+ await expectCanvas('empty-canvas')})test('draw rectangle', async () => {await canvas.drawRect(100, 100, 200, 150)- await expect(canvas.canvas).toHaveScreenshot({ timeout: 3000 })+ await expectCanvas('draw-rectangle')})test('draw ellipse', async () => {await canvas.drawEllipse(100, 100, 200, 150)- await expect(canvas.canvas).toHaveScreenshot({ timeout: 3000 })+ await expectCanvas('draw-ellipse')})test('draw rectangle then move it', async () => {@@ -41,17 +46,17 @@ test('draw rectangle then move it', async () => {await canvas.selectTool('select')await canvas.drag(200, 175, 400, 300)await canvas.waitForRender()- await expect(canvas.canvas).toHaveScreenshot({ timeout: 3000 })+ await expectCanvas('draw-rectangle-then-move-it')})test('draw and delete', async () => {await canvas.drawRect(100, 100, 200, 150)await canvas.deleteSelection()- await expect(canvas.canvas).toHaveScreenshot({ timeout: 3000 })+ await expectCanvas('draw-and-delete')})test('draw and undo', async () => {await canvas.drawRect(100, 100, 200, 150)await canvas.undo()- await expect(canvas.canvas).toHaveScreenshot({ timeout: 3000 })+ await expectCanvas('draw-and-undo')})diff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-delete-1-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-delete-1-openpencil-darwin.pngdeleted file mode 100644index a96c28bf1..000000000Binary files a/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-delete-1-openpencil-darwin.png and /dev/null differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-delete-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-delete-openpencil-darwin.pngnew file mode 100644index 000000000..c9081c3fdBinary files /dev/null and b/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-delete-openpencil-darwin.png differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-undo-1-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-undo-1-openpencil-darwin.pngdeleted file mode 100644index a96c28bf1..000000000Binary files a/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-undo-1-openpencil-darwin.png and /dev/null differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-undo-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-undo-openpencil-darwin.pngnew file mode 100644index 000000000..a39e5f55dBinary files /dev/null and b/tests/e2e/create-shapes.spec.ts-snapshots/draw-and-undo-openpencil-darwin.png differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-ellipse-1-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-ellipse-1-openpencil-darwin.pngdeleted file mode 100644index b615cdea1..000000000Binary files a/tests/e2e/create-shapes.spec.ts-snapshots/draw-ellipse-1-openpencil-darwin.png and /dev/null differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-ellipse-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-ellipse-openpencil-darwin.pngnew file mode 100644index 000000000..3199413beBinary files /dev/null and b/tests/e2e/create-shapes.spec.ts-snapshots/draw-ellipse-openpencil-darwin.png differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-1-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-1-openpencil-darwin.pngdeleted file mode 100644index 5d0aab530..000000000Binary files a/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-1-openpencil-darwin.png and /dev/null differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-openpencil-darwin.pngnew file mode 100644index 000000000..dd66a8836Binary files /dev/null and b/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-openpencil-darwin.png differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-then-move-it-1-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-then-move-it-1-openpencil-darwin.pngdeleted file mode 100644index 4a382df4e..000000000Binary files a/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-then-move-it-1-openpencil-darwin.png and /dev/null differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-then-move-it-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-then-move-it-openpencil-darwin.pngnew file mode 100644index 000000000..cc5f82143Binary files /dev/null and b/tests/e2e/create-shapes.spec.ts-snapshots/draw-rectangle-then-move-it-openpencil-darwin.png differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/empty-canvas-1-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/empty-canvas-1-openpencil-darwin.pngdeleted file mode 100644index a96c28bf1..000000000Binary files a/tests/e2e/create-shapes.spec.ts-snapshots/empty-canvas-1-openpencil-darwin.png and /dev/null differdiff --git a/tests/e2e/create-shapes.spec.ts-snapshots/empty-canvas-openpencil-darwin.png b/tests/e2e/create-shapes.spec.ts-snapshots/empty-canvas-openpencil-darwin.pngnew file mode 100644index 000000000..59ae3914bBinary files /dev/null and b/tests/e2e/create-shapes.spec.ts-snapshots/empty-canvas-openpencil-darwin.png differ