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' + } + }) }, } ],