diff --git a/package.json b/package.json index 2c981014..01f9d700 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,8 @@ "test:e2e": "playwright test", "test:e2e:update": "playwright test --update-snapshots", "test:e2e:ui": "playwright test --ui", + "test:e2e:docker": "docker run --rm -v $(pwd):/work -w /work -it mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'npm i -g bun && npm ci && npx playwright test'", + "test:e2e:docker:update": "docker run --rm -v $(pwd):/work -w /work -it mcr.microsoft.com/playwright:v1.57.0-noble sh -c 'npm i -g bun && npm ci && npx playwright test --update-snapshots'", "examples:build": "bun examples/run-all.ts build", "examples:start": "NODE_ENV=development npm run build && bun examples/run-all.ts start", "examples:dev": "NODE_ENV=development bun examples/run-all.ts dev", diff --git a/playwright.config.ts b/playwright.config.ts index 4df27e38..38aab452 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -21,10 +21,8 @@ export default defineConfig({ name: "chromium", use: { ...devices["Desktop Chrome"], - launchOptions: { - // Use system Chrome on macOS for stability, default chromium in CI - ...(process.platform === "darwin" ? { channel: "chrome" } : {}), - }, + // Use default Chromium everywhere for consistent screenshot rendering + // Run `npm run test:e2e:docker` locally for CI-identical results }, }, ], diff --git a/tests/e2e/servers.spec.ts-snapshots/basic-react.png b/tests/e2e/servers.spec.ts-snapshots/basic-react.png index fdab639a..c05d51ab 100644 Binary files a/tests/e2e/servers.spec.ts-snapshots/basic-react.png and b/tests/e2e/servers.spec.ts-snapshots/basic-react.png differ diff --git a/tests/e2e/servers.spec.ts-snapshots/basic-vanillajs.png b/tests/e2e/servers.spec.ts-snapshots/basic-vanillajs.png index b69bb6af..cc934755 100644 Binary files a/tests/e2e/servers.spec.ts-snapshots/basic-vanillajs.png and b/tests/e2e/servers.spec.ts-snapshots/basic-vanillajs.png differ