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 <noreply@anthropic.com>
This commit is contained in:
parent
8550545ccb
commit
6f14cf301d
4 changed files with 4 additions and 4 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 46 KiB |
Loading…
Reference in a new issue