Fix setup project: override testDir so global.setup.ts is discovered #1
Reference in New Issue
Block a user
Delete Branch "claude/setup-project-testdir-fix-20260514"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
testDir: './tests'scopes Playwright's file discovery.global.setup.tslives at the repo root, so the setup project'stestMatch: /global\.setup\.ts/never matched - Playwright silently ran 0 setup tests.playwright/.auth/admin.jsonwas never written, and every dependent test failed on storageState load withENOENT.testDir: '.'to the setup project. Scoped per-project, so the chromium project still uses the top-level./teststestDir.Impact
Bug has been silently blocking PRAutoBlogger's workflow-driven prod deploys since the smoke gate was added on 2026-04-26. v0.14.0 and v0.15.0 reached prod via manual SSH rsync. PR peptiderepo/prautoblogger#142 (v0.15.1) is currently held on staging waiting for this fix.
Test plan
Deploy PRAutoBlogger to Hostingerjob on prautoblogger SHA1955f928Running 22 tests using 1 worker(1 setup + 21 smoke) instead of21 testsplaywright/.auth/admin.jsonis writtenDiagnosis evidence
Smoke log on the prautoblogger v0.15.1 run shows
Running 21 tests using 1 worker- setup project contributed zero tests. Every failure has the identical errorENOENT: 'playwright/.auth/admin.json'. The auth flow itself (credentials, login form selectors) was never exercised - it can't have failed because it never ran.