Skip to content

fix(e2e): skip headed browser tests on Linux CI without display#999

Merged
fi3ework merged 1 commit intomainfrom
fix/skip-headed-browser-tests-on-ci
Mar 4, 2026
Merged

fix(e2e): skip headed browser tests on Linux CI without display#999
fi3ework merged 1 commit intomainfrom
fix/skip-headed-browser-tests-on-ci

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Mar 4, 2026

Problem

viewport.test.ts and locatorApi.test.ts have test cases that pass --browser.headless false, forcing headed mode. These fail on Linux CI (e.g. ecosystem-ci on Ubuntu) because there is no X Server / $DISPLAY.

Fix

Gate the headed-mode test cases with the existing canRunHeadedBrowser check from e2e/browser-mode/utils.ts, so they are automatically skipped when no display server is available (Linux without DISPLAY/WAYLAND_DISPLAY). macOS and Windows are unaffected.

Changes

  • e2e/browser-mode/viewport.test.ts: it.skipIf(!canRunHeadedBrowser) on the headed test case
  • e2e/browser-mode/locatorApi.test.ts: it.skipIf(!canRunHeadedBrowser) on the headed test case

viewport.test.ts and locatorApi.test.ts have test cases that pass
`--browser.headless false`, forcing headed mode. These fail on Linux CI
(e.g. ecosystem-ci on Ubuntu) because there is no X Server / $DISPLAY.

Gate these tests with the existing `canRunHeadedBrowser` check so they
are automatically skipped when no display server is available.

Amp-Thread-ID: https://ampcode.com/threads/T-019cb6d2-2de7-757d-8fb6-e47e3c4fbd93
Co-authored-by: Amp <amp@ampcode.com>
@fi3ework fi3ework merged commit 7b2a36d into main Mar 4, 2026
34 of 42 checks passed
@fi3ework fi3ework deleted the fix/skip-headed-browser-tests-on-ci branch March 4, 2026 07:35
@9aoy 9aoy mentioned this pull request Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants