From 4a7fec7b743461b9cd56fbe44750c89302894d88 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Thu, 14 May 2026 17:30:35 +0800 Subject: [PATCH] Fix setup project: override testDir to repo root so global.setup.ts is found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The top-level testDir is './tests', which scopes Playwright's file discovery. global.setup.ts lives at repo root, so the setup project's testMatch regex never got a chance to match — Playwright silently ran 0 setup tests, the storage-state file at playwright/.auth/admin.json was never written, and every dependent test failed on storageState load with ENOENT. Adding 'testDir: \".\"' on the setup project lets Playwright scan repo root for files matching the testMatch regex without affecting the chromium project, which still uses the top-level './tests' testDir. Bug present since the initial smoke suite (d46a1e4). Has been blocking PRAutoBlogger workflow-driven prod deploys since the smoke gate was added on 2026-04-26 (prautoblogger 96f0248d). v0.14.0 and v0.15.0 reached prod via manual SSH rsync outside the workflow. Agent-Session: cto peptide-e2e-setup-project-fix --- playwright.config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index b2e2444..bf47b7f 100755 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -43,9 +43,14 @@ export default defineConfig({ }, projects: [ - // Auth setup — runs first, saves session to disk + // Auth setup — runs first, saves session to disk. + // testDir override: global.setup.ts lives at repo root, not under ./tests. + // Without this, the top-level testDir './tests' filters it out and the + // setup project silently runs 0 tests, leaving the storage-state file + // unwritten and every chromium-project test failing on storageState load. { name: 'setup', + testDir: '.', testMatch: /global\.setup\.ts/, }, // All smoke tests — depend on auth setup -- 2.49.1