test: exclude screenshot-gen from default E2E run; wire pdf-server tests (#537)
Bug 1: generate-grid-screenshots.spec.ts was running on every CI E2E invocation because playwright.config.ts had no testIgnore. This spec writes examples/*/grid-cell.png as a side effect — it's meant to be invoked only via npm run generate:screenshots. Added testIgnore gated on GENERATE_SCREENSHOTS env var (Playwright's testIgnore is stronger than explicit CLI file args, so a plain ignore would break generate:screenshots). Passed the env var through the docker invocation in generate:screenshots. Before: npx playwright test --list → 82 tests in 3 files After: npx playwright test --list → 65 tests in 2 files GENERATE_SCREENSHOTS=1 ... --list → 17 tests in 1 file (still works) Bug 2: examples/pdf-server/server.test.ts (448 LOC, 34 tests) was never run — root script was 'bun test src'. Changed to 'bun test src examples'. Only one .test. file exists in examples/ so no noise. Before: npm test → 87 pass across 3 files After: npm test → 121 pass across 4 files
This commit is contained in:
parent
6b12fff1d0
commit
1ea1e9ef43
1 changed files with 9 additions and 2 deletions
|
|
@ -2,6 +2,13 @@ import { defineConfig, devices } from "@playwright/test";
|
|||
|
||||
export default defineConfig({
|
||||
testDir: "./tests/e2e",
|
||||
// Exclude the screenshot generation spec from default runs.
|
||||
// It writes examples/*/grid-cell.png as a side effect and is meant to be
|
||||
// invoked only via `npm run generate:screenshots` (which sets
|
||||
// GENERATE_SCREENSHOTS=1 to bypass this ignore).
|
||||
testIgnore: process.env.GENERATE_SCREENSHOTS
|
||||
? []
|
||||
: ["**/generate-grid-screenshots.spec.ts"],
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue