From 081e46cb4443c0c8eeab265e38b0467234c4ed7b Mon Sep 17 00:00:00 2001 From: alexpolo1 Date: Thu, 20 Aug 2026 13:37:23 +0200 Subject: [PATCH] fix: only use local system Chromium in Playwright config outside CI The blocking carpenter smoke test (introduced in this branch) exposed a pre-existing gap: playwright.config.js hardcoded executablePath: '/snap/bin/chromium' plus channel: 'chromium' for the maintainer's local CachyOS machine. CI has no /snap/bin/chromium (it installs its own Chromium via `playwright install --with-deps chromium`), so every CI run was silently failing to launch the browser - previously masked because the whole E2E step had continue-on-error: true. Gate both overrides behind `!process.env.CI` so local runs keep using system Chromium and CI falls back to its own installed browser. Co-Authored-By: Claude Sonnet 5 --- tests/playwright.config.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/playwright.config.js b/tests/playwright.config.js index b51413b..6e481d7 100644 --- a/tests/playwright.config.js +++ b/tests/playwright.config.js @@ -29,8 +29,9 @@ module.exports = defineConfig({ /* Run in headless mode */ headless: true, - /* Use system Chrome/Chromium for CachyOS compatibility */ - channel: 'chromium', + /* Use system Chrome/Chromium for CachyOS compatibility (local runs only - + CI uses its own Playwright-installed Chromium, see the chromium project below) */ + ...(process.env.CI ? {} : { channel: 'chromium' }), /* Extra headers to send with requests */ extraHTTPHeaders: { @@ -59,12 +60,16 @@ module.exports = defineConfig({ projects: [ { name: 'chromium', - use: { + use: { ...devices['Desktop Chrome'], - // Use system Chromium on CachyOS - launchOptions: { - executablePath: '/snap/bin/chromium' - } + // Use system Chromium on CachyOS for local runs. CI installs its own + // Chromium via `playwright install` and has no /snap/bin/chromium, so + // this override must not apply there. + ...(process.env.CI ? {} : { + launchOptions: { + executablePath: '/snap/bin/chromium' + } + }) }, } ],