Repository navigation
DO-2071: allow choosing which Playwright browsers node-pr installs - #213
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the proposed changes
Context
The Install Playwright step in
node-pr.ymlalways 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.ymlto 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:24container) with each combination of inputs. Results:chromiumchromium+ only-shellchromium firefoxTo test end to end, call
node-pr.ymlfrom this branch in a project with Storybook tests, withplaywright-browsers: chromiumandplaywright-only-shell: true. Check that the install is faster andtest-storybookstill passes.Screenshots (if applicable)
Other solutions considered (if any)
playwright-browserstochromium: this would speed up every project withoe. But it would break any project that runs the Storybook test runner with--browsersfirefoxorwebkit, or that uses Playwright browsers in other test steps. Projects opt in instead.--only-shellby default: the option fails on Playwright versions before 1.headed. Projects opt in instead.Notes to PR author
Notes to reviewers
Time Tracking
DO-2071: code review, select projectXXXX🤖 Generated with Claude Code