👷 default local e2e to chromium only - #4634
Conversation
There was a problem hiding this comment.
💡 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".
| "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", |
There was a problem hiding this comment.
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 👍 / 👎.
Bundles Sizes Evolution
🚀 CPU PerformancePending... 🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 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).
1d5ac10 to
ef567f0
Compare
Motivation
Running
yarn test:e2elocally 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.jsonchange in #4618 but solves it insideplaywright.config.tsso the test scripts and CI command stay untouched.Changes
test/e2e/playwright.config.ts:--project=<name>is not passed (typical local run), only thechromiumproject is registered →yarn test:e2eruns chromium only.--project=<name>is passed (locally or in CI), all projects are registered and Playwright filters to the selected one(s) — soyarn test:e2e --project=firefoxstill works, and the CI matrix continues to run as before.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
yarn test:e2eshould now run chromium only.yarn test:e2e --project=firefox(orwebkit,chromium-pinned, etc.) should still run that project.yarn test:e2e --project=$BROWSERmatrix invocation is unchanged.Checklist