Skip to content

DO-2071: allow choosing which Playwright browsers node-pr installs - #213

Merged
tmthrgd-aligent merged 1 commit into
mainfrom
feature/DO-2071_playwright_browsers
Nov 23, 2026
Merged

tmthrgd-aligent merged 1 commit into
mainfrom
feature/DO-2071_playwright_browsers

Conversation

@tmthrgd-aligent

Copy link
Copy Markdown
Contributor

Description of the proposed changes

Context

The Install Playwright step in node-pr.yml always installs all of Playwright's default browsers (Chromium, Firefox, WebKit) and their system dependencies. The Storybook test runner only uses Chromium unless it's given --browsers, so most projects download and install more than they need on every PR run.

Changes

Add two inputs to node-pr.yml to choose what the Install Playwright step installs:

  • playwright-browsers: the browsers to install, separated by spaces (e.g. chromium firefox). By default, all of Playwright's default browsers are installed, as before.
  • playwright-only-shell: install a smaller, headless-only Chromium (--only-shell). Needs Playwright 1.49+.

With both inputs left at their defaults, the step runs the same command as before. Both inputs are documented in docs/node-pr.md.

Test

Run playwright install --dry-run (Playwright 1.49.0, node:24 container) with each combination of inputs. Results:

Inputs Installs
defaults (unchanged) full Chromium, headless shell, Firefox, WebKit, ffmpeg
only-shell headless shell, Firefox, WebKit, ffmpeg
chromium full Chromium, headless shell, ffmpeg
chromium + only-shell headless shell, ffmpeg
chromium firefox full Chromium, headless shell, Firefox, ffmpeg

To test end to end, call node-pr.yml from this branch in a project with Storybook tests, with playwright-browsers: chromium and playwright-only-shell: true. Check that the install is faster and test-storybook still passes.

Screenshots (if applicable)

Other solutions considered (if any)

  • Default playwright-browsers to chromium: this would speed up every project withoe. But it would break any project that runs the Storybook test runner with --browsersfirefox or webkit, or that uses Playwright browsers in other test steps. Projects opt in instead.
  • Turn on --only-shell by default: the option fails on Playwright versions before 1.headed. Projects opt in instead.

Notes to PR author

  • ⚠️ Please make sure the changes adhere to the guidelines mentioned in our [contribution aligent/.github/blob/main/CONTRIBUTING.md).

Notes to reviewers

  • ℹ️ When you've finished leaving feedback, please add a final comment to the PR tagging tow that you have finished leaving feedback

Time Tracking

  • DO-2071: code review, select project XXXX

🤖 Generated with Claude Code

The Install Playwright step always installed all of Playwright's default
browsers and their system dependencies. The Storybook test runner only
uses Chromium unless it's given --browsers, so most projects download
and install more than they need.

Add two inputs:
- playwright-browsers: the browsers to install, separated by spaces.
  By default, all of Playwright's default browsers are installed, as
  before.
- playwright-only-shell: install a smaller, headless-only Chromium
  (--only-shell). Needs Playwright 1.49+.

With both inputs left at their defaults, the step runs the same command
as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@aaronmedina-dev aaronmedina-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tmthrgd-aligent
tmthrgd-aligent merged commit 3ebd989 into main Nov 23, 2026
3 checks passed
@tmthrgd-aligent
tmthrgd-aligent deleted the feature/DO-2071_playwright_browsers branch November 23, 2026 02:14
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