Skip to content

test: enable headless mode by default in tests#1019

Merged
fi3ework merged 2 commits intomainfrom
browser-headless
Mar 6, 2026
Merged

test: enable headless mode by default in tests#1019
fi3ework merged 2 commits intomainfrom
browser-headless

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Mar 6, 2026

Summary

enable headless mode by default in tests.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 6, 2026

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1c3246f
Status: ✅  Deploy successful!
Preview URL: https://947a337d.rstest.pages.dev
Branch Preview URL: https://browser-headless.rstest.pages.dev

View logs

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e81d82461

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -26,6 +26,9 @@ export default defineConfig({
// calendar fields; forcing UTC makes results consistent.
env: {
TZ: 'UTC',
BROWSER_HEADLESS: process.argv.includes('--browser.headless')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse BROWSER_HEADLESS from option value

process.argv.includes('--browser.headless') marks the run as headless even when the CLI explicitly sets --browser.headless false, because the flag token is still present in argv. In that scenario, browser e2e helpers that read BROWSER_HEADLESS will still inject --browser.headless into spawned rstest run commands, so a globally headed debug run cannot be requested reliably; this should be derived from the parsed boolean value (or explicitly detect false) instead of flag presence alone.

Useful? React with 👍 / 👎.

@9aoy 9aoy requested a review from fi3ework March 6, 2026 09:50
@9aoy 9aoy changed the title chore: enable headless mode by default in tests test: enable headless mode by default in tests Mar 6, 2026
@fi3ework fi3ework merged commit 311f280 into main Mar 6, 2026
11 checks passed
@fi3ework fi3ework deleted the browser-headless branch March 6, 2026 11:46
@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants