Skip to content

Commit

Permalink
chore(deps-dev): bump playwright from 1.48.1 to 1.49.1 (#3229)
Browse files Browse the repository at this point in the history
Update some firefox thresholds for macos to make the tests pass. They were periodically failing for unknown reasons, so increase the threshold a bit to avoid false positives.

Update the GitHub Actions configuration:
  - build-setup action: browsers are no longer installed by default when running `npm install`, so remove extra environment variable
  - only use the chromium headless shell browser when running on GH Actions to reduce the download and installation size

Documentation : update instructions to use chromium headless shell in development as well
  • Loading branch information
dependabot[bot] authored Jan 6, 2025
1 parent c1e65ac commit c1b7e92
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 24 deletions.
3 changes: 0 additions & 3 deletions .github/actions/build-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@ runs:
- name: Install dependencies
uses: bahmutov/npm-install@v1
if: inputs.install-dependencies == 'true'
env:
# Do not install browsers https://playwright.dev/docs/browsers#installing-browsers
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
with:
install-command: npm ci --ignore-scripts --prefer-offline --audit false
3 changes: 2 additions & 1 deletion .github/actions/install-playwright-browser/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ runs:
# Only install browsers not available in the GH runner, or that need a special version modified for playwright
if: inputs.browser == 'chromium' || inputs.browser == 'firefox' || inputs.browser == 'webkit'
shell: bash
run: npx playwright install ${{inputs.browser}}
# --only-shell: only install headless shell when installing chromium
run: npx playwright install ${{inputs.browser}} --only-shell
# install OS dependencies required by browsers on the GitHub runner
# to be sure that the browser is correctly installed: https://github.com/microsoft/playwright/issues/5801
- name: Install ${{inputs.browser}} dependencies
Expand Down
5 changes: 4 additions & 1 deletion docs/contributors/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ Html reports are generated for test execution and coverage in
**IMPORTANT**
- as of version 1.38.0, `playwright` no longer installs browsers when running `npm install` (see [playwright v1.38.0 release-notes](https://github.com/microsoft/playwright/releases/tag/v1.38.0)).
This means that browsers must be installed manually, and may need to be reinstalled when the Playwright version changes.
- see the [Playwright documentation](https://playwright.dev/docs/browsers#installing-browsers) for more details about browsers management
- see the [Playwright documentation](https://playwright.dev/docs/browsers#installing-browsers) for more details about browsers management.
- for chromium, only use the headless shell version, by passing the `--only-shell` option to the `install` command. For example, `npx playwright install chromium --only-shell`. For more details, see:
- the [Playwright headless documentation](https://playwright.dev/docs/browsers#optimize-download-size-on-ci)
- the announcement in [Playwright 1.49.0](https://github.com/microsoft/playwright/issues/33566)

By default,
- end-to-end tests use Chromium.
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"minimist": "~1.2.8",
"npm-run-all": "~4.1.5",
"pinst": "~3.0.0",
"playwright": "~1.48.1",
"playwright": "~1.49.1",
"postcss": "~8.4.49",
"postcss-cli": "~11.0.0",
"prettier": "~3.4.2",
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/overlays.rendering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,21 @@ class ImageSnapshotThresholds extends MultiBrowserImageSnapshotThresholds {
[
'overlays.edges.associations.complex.paths',
{
macos: 0.58 / 100, // max 0.5720992962210847%
macos: 0.69 / 100, // max 0.6860492031835808%
},
],
[
'overlays.edges.message.flows.complex.paths',
{
linux: 0.58 / 100, // 0.5794594395932884%
macos: 0.7 / 100, // 0.6952084225053445%
macos: 0.71 / 100, // 0.7082393664009867%
windows: 0.66 / 100, // 0.6524091603189786%
},
],
[
'overlays.edges.sequence.flows.complex.paths',
{
macos: 0.5 / 100, // max 0.4635845943908756%
macos: 0.51 / 100, // max 0.5010509935943763%
},
],
]);
Expand Down

0 comments on commit c1b7e92

Please sign in to comment.