diff --git a/excalidraw-app/package.json b/excalidraw-app/package.json index e5dcde0333..a5fa5e034f 100644 --- a/excalidraw-app/package.json +++ b/excalidraw-app/package.json @@ -46,6 +46,7 @@ "build:version": "node ../scripts/build-version.js", "build": "yarn build:app && yarn build:version", "start": "yarn && vite", + "start:test": "yarn && vite --mode test", "start:production": "yarn build && yarn serve", "serve": "npx http-server build -a localhost -p 5001 -o", "build:preview": "yarn build && vite preview --port 5000" diff --git a/excalidraw-app/tests/regression/binding.spec.ts-snapshots/17562123239901g67cqde-1.png b/excalidraw-app/tests/regression/binding.spec.ts-snapshots/17562123239901g67cqde-1.png index ab23741c74..323cd970b3 100644 Binary files a/excalidraw-app/tests/regression/binding.spec.ts-snapshots/17562123239901g67cqde-1.png and b/excalidraw-app/tests/regression/binding.spec.ts-snapshots/17562123239901g67cqde-1.png differ diff --git a/package.json b/package.json index 06669121cc..5aa4524204 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "build:preview": "yarn --cwd ./excalidraw-app build:preview", "start": "yarn --cwd ./excalidraw-app start", "start:production": "yarn --cwd ./excalidraw-app start:production", + "start:test": "yarn --cwd ./excalidraw-app start:test", "start:example": "yarn build:packages && yarn --cwd ./examples/with-script-in-browser start", "test:all": "yarn test:typecheck && yarn test:code && yarn test:other && yarn test:app --watch=false", "test:app": "vitest", diff --git a/packages/element/src/shape.ts b/packages/element/src/shape.ts index 7a8cd351a1..f2f7d9b676 100644 --- a/packages/element/src/shape.ts +++ b/packages/element/src/shape.ts @@ -21,6 +21,7 @@ import { assertNever, COLOR_PALETTE, LINE_POLYGON_POINT_MERGE_DISTANCE, + isTestEnv, } from "@excalidraw/common"; import { RoughGenerator } from "roughjs/bin/generator"; @@ -182,7 +183,7 @@ export const generateRoughOptions = ( continuousPath = false, ): Options => { const options: Options = { - seed: element.seed, + seed: isTestEnv() ? 1 : element.seed, strokeLineDash: element.strokeStyle === "dashed" ? getDashArrayDashed(element.strokeWidth) diff --git a/playwright.config.ts b/playwright.config.ts index 7021f389f0..0816a19e7d 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -44,7 +44,7 @@ export default defineConfig({ use: { ...devices["Desktop Chrome"], launchOptions: { - args: ["--disable-font-subpixel-positioning"], + args: ["--disable-font-subpixel-positioning", "--disable-gpu"], }, }, },