AI-native design editor. Open-source Figma alternative.
test: replace legacy demo snapshots with current coverage
Danila Poyarkov9973bd2f18e7
diff --git a/tests/e2e/canvas/demo-effects.spec.ts b/tests/e2e/canvas/demo-effects.spec.tsdeleted file mode 100644index 9335509f4..000000000--- a/tests/e2e/canvas/demo-effects.spec.ts+++ /dev/null@@ -1,30 +0,0 @@-import { expect, test, useEditorSetup } from '#tests/e2e/fixtures'-import { selectDemoReferencePage } from '#tests/helpers/demo'--const editor = useEditorSetup('/demo?no-chrome&no-rulers')--async function expectCanvas(name: string) {- editor.canvas.assertNoErrors()- const buffer = await editor.canvas.screenshotCanvasRegion(1000, 1050)- expect(buffer).toMatchSnapshot(`${name}.png`)-}--test('demo effects section showcases renderer features', async () => {- await selectDemoReferencePage(editor.page)- await editor.page.setViewportSize({ width: 1000, height: 1050 })- await editor.canvas.waitForRender()- await editor.page.evaluate(() => {- const store = window.openPencil?.getStore?.()- if (!store) throw new Error('OpenPencil store not initialized')- const effects = store.graph- .getChildren(store.state.currentPageId)- .find((node) => node.name === 'Effects')- if (!effects) throw new Error('Demo effects section not found')- store.select([effects.id])- store.zoomToSelection()- store.clearSelection()- store.requestRender()- })- await editor.canvas.waitForRender()- await expectCanvas('demo-effects-section')-})diff --git a/tests/e2e/canvas/demo-effects.spec.ts-snapshots/demo-effects-section-openpencil-darwin.png b/tests/e2e/canvas/demo-effects.spec.ts-snapshots/demo-effects-section-openpencil-darwin.pngdeleted file mode 100644index bf1f17a62..000000000Binary files a/tests/e2e/canvas/demo-effects.spec.ts-snapshots/demo-effects-section-openpencil-darwin.png and /dev/null differdiff --git a/tests/e2e/canvas/demo-workspace.spec.ts b/tests/e2e/canvas/demo-workspace.spec.tsindex c49d0b907..6aeb96efc 100644--- a/tests/e2e/canvas/demo-workspace.spec.ts+++ b/tests/e2e/canvas/demo-workspace.spec.ts@@ -48,7 +48,9 @@ for (const [name, snapshot] of [})}-test('demo completion preserves a document replaced during its final page switch', async ({ page }) => {+test('demo completion preserves a document replaced during its final page switch', async ({+ page+}) => {await page.goto('/?test&no-chrome&no-rulers')const canvas = new CanvasHelper(page)await canvas.waitForInit()diff --git a/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-announcements-openpencil-darwin.png b/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-announcements-openpencil-darwin.pngindex 579d32e06..7bc2ac784 100644Binary files a/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-announcements-openpencil-darwin.png and b/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-announcements-openpencil-darwin.png differdiff --git a/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-paint-openpencil-darwin.png b/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-paint-openpencil-darwin.pngindex 6c304899a..290f2c619 100644Binary files a/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-paint-openpencil-darwin.png and b/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-paint-openpencil-darwin.png differdiff --git a/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-typography-openpencil-darwin.png b/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-typography-openpencil-darwin.pngindex c90362370..7c1c5102f 100644Binary files a/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-typography-openpencil-darwin.png and b/tests/e2e/canvas/demo-workspace.spec.ts-snapshots/demo-typography-openpencil-darwin.png differdiff --git a/tests/e2e/canvas/instance-sizing.spec.ts-snapshots/instance-fill-sizing-openpencil-darwin.png b/tests/e2e/canvas/instance-sizing.spec.ts-snapshots/instance-fill-sizing-openpencil-darwin.pngindex a575cf474..624d64518 100644Binary files a/tests/e2e/canvas/instance-sizing.spec.ts-snapshots/instance-fill-sizing-openpencil-darwin.png and b/tests/e2e/canvas/instance-sizing.spec.ts-snapshots/instance-fill-sizing-openpencil-darwin.png differ