test: enable headless mode by default in tests#1019
Conversation
Deploying rstest with
|
| Latest commit: |
1c3246f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://947a337d.rstest.pages.dev |
| Branch Preview URL: | https://browser-headless.rstest.pages.dev |
There was a problem hiding this comment.
💡 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') | |||
There was a problem hiding this comment.
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 👍 / 👎.
…rowser-headless
Summary
enable headless mode by default in tests.
Related Links
Checklist