Skip to content

👷 default local e2e to chromium only - #4634

Merged
thomas-lebeau merged 1 commit into
mainfrom
thomas.lebeau/default-e2e-to-chromium
May 15, 2026
Merged

👷 default local e2e to chromium only#4634
thomas-lebeau merged 1 commit into
mainfrom
thomas.lebeau/default-e2e-to-chromium

Conversation

@thomas-lebeau

@thomas-lebeau thomas-lebeau commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Running yarn test:e2e locally currently runs all 4 default Playwright projects (chromium, chromium-pinned, firefox-pinned, webkit-pinned), making the local feedback loop very slow.

This ports the intent of the package.json change in #4618 but solves it inside playwright.config.ts so the test scripts and CI command stay untouched.

Changes

test/e2e/playwright.config.ts:

  • When --project=<name> is not passed (typical local run), only the chromium project is registered → yarn test:e2e runs chromium only.
  • When --project=<name> is passed (locally or in CI), all projects are registered and Playwright filters to the selected one(s) — so yarn test:e2e --project=firefox still works, and the CI matrix continues to run as before.
  • The decision is taken once in the main process (from argv) and propagated to Playwright workers via an env var, since workers re-import the config without the original argv.
  • needsPinnedServers() is simplified to only boot the pinned web servers when a pinned project is selected (no longer needs the "no args = all" branch).

Test instructions

  • Local: yarn test:e2e should now run chromium only.
  • Local: yarn test:e2e --project=firefox (or webkit, chromium-pinned, etc.) should still run that project.
  • CI: the existing yarn test:e2e --project=$BROWSER matrix invocation is unchanged.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@thomas-lebeau
thomas-lebeau marked this pull request as ready for review May 15, 2026 13:38
@thomas-lebeau
thomas-lebeau requested a review from a team as a code owner May 15, 2026 13:38

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

Copy link
Copy Markdown

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: 1d5ac106ba

ℹ️ 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".

Comment thread package.json Outdated
"test:unit:bs": "node --env-file-if-exists=.env ./scripts/test/bs-wrapper.ts karma start test/unit/karma.bs.conf.js",
"test:e2e:init": "yarn build && yarn build:apps && yarn playwright install --with-deps && yarn dlx -p playwright@1.40.1 playwright install chromium firefox webkit",
"test:e2e": "playwright test --config test/e2e/playwright.config.ts",
"test:e2e": "playwright test --config test/e2e/playwright.config.ts --project=chromium",

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 Preserve --project overrides for local E2E

When a developer follows the documented pinned-browser commands such as yarn test:e2e --project=firefox-pinned, this script now expands to Playwright with both --project=chromium and --project=firefox-pinned. Playwright's CLI treats --project as the specified list of projects, so the user-selected browser is no longer exclusive and Chromium always runs as well; this makes targeted local debugging and pinned-browser runs slower and can hide that the requested command did not run in isolation. Consider adding the default Chromium project only when the caller did not pass any --project option.

Useful? React with 👍 / 👎.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented May 15, 2026

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 169.51 KiB 169.51 KiB 0 B 0.00%
Rum Profiler 5.97 KiB 5.97 KiB 0 B 0.00%
Rum Recorder 21.23 KiB 21.23 KiB 0 B 0.00%
Logs 54.70 KiB 54.70 KiB 0 B 0.00%
Rum Slim 127.85 KiB 127.85 KiB 0 B 0.00%
Worker 22.99 KiB 22.99 KiB 0 B 0.00%
🚀 CPU Performance

Pending...

🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 42.69 KiB 37.91 KiB -4.78 KiB
RUM - add action 67.95 KiB 66.68 KiB -1.27 KiB
RUM - add timing 37.49 KiB 37.80 KiB +319 B
RUM - add error 73.15 KiB 71.09 KiB -2.07 KiB
RUM - start/stop session replay recording 41.06 KiB 41.06 KiB -1 B
RUM - start view 492.59 KiB 484.98 KiB -7.61 KiB
Logs - log message 55.59 KiB 56.20 KiB +624 B

🔗 RealWorld

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented May 15, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 76.96% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ef567f0 | Docs | Datadog PR Page | Give us feedback!

When `yarn test:e2e` is called without `--project`, register only the chromium project so the local feedback loop stays fast. When `--project=<name>` is passed (locally or in CI), register all projects and let Playwright filter to the selected one.

The decision is captured in an env var on the main process so it survives Playwright's worker re-imports (workers don't see the original `--project` argv).

This avoids the previous behavior where `yarn test:e2e` ran chromium + the three pinned projects (chromium-pinned, firefox-pinned, webkit-pinned).
@thomas-lebeau
thomas-lebeau force-pushed the thomas.lebeau/default-e2e-to-chromium branch from 1d5ac10 to ef567f0 Compare May 15, 2026 15:02
@thomas-lebeau
thomas-lebeau merged commit 2f7c57a into main May 15, 2026
22 checks passed
@thomas-lebeau
thomas-lebeau deleted the thomas.lebeau/default-e2e-to-chromium branch May 15, 2026 15:16
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants