Skip to content

Commit 6f14cf3

Browse files
ochafikclaude
andauthored
fix: ensure E2E screenshot tests work consistently across CI and local (#150)
- Remove platform-specific browser channel (was using Chrome on macOS, Chromium in CI) - now uses default Chromium everywhere - Add Docker-based test scripts for CI-identical local testing: - `npm run test:e2e:docker` - run tests in Docker - `npm run test:e2e:docker:update` - regenerate golden screenshots - Regenerate golden screenshots using Docker/Linux environment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]>
1 parent 8550545 commit 6f14cf3

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
"test:e2e": "playwright test",
4141
"test:e2e:update": "playwright test --update-snapshots",
4242
"test:e2e:ui": "playwright test --ui",
43+
"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'",
44+
"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'",
4345
"examples:build": "bun examples/run-all.ts build",
4446
"examples:start": "NODE_ENV=development npm run build && bun examples/run-all.ts start",
4547
"examples:dev": "NODE_ENV=development bun examples/run-all.ts dev",

playwright.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ export default defineConfig({
2121
name: "chromium",
2222
use: {
2323
...devices["Desktop Chrome"],
24-
launchOptions: {
25-
// Use system Chrome on macOS for stability, default chromium in CI
26-
...(process.platform === "darwin" ? { channel: "chrome" } : {}),
27-
},
24+
// Use default Chromium everywhere for consistent screenshot rendering
25+
// Run `npm run test:e2e:docker` locally for CI-identical results
2826
},
2927
},
3028
],
-1.17 KB
Loading
-1.36 KB
Loading

0 commit comments

Comments
 (0)