Skip to content

Commit 0a5c2b6

Browse files
authored
🔧 Dissociate pinned e2e setup (#4811)
1 parent 52144be commit 0a5c2b6

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎docs/TESTING.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ See `test/e2e/AGENTS.md` for the full E2E testing guide (setup, writing tests, c
3939

4040
Quick commands:
4141

42-
- `yarn test:e2e:setup` — first-time setup
42+
- `yarn test:e2e:setup` — first-time setup (builds packages and apps, then installs browsers for the workspace Playwright version)
43+
- `yarn test:e2e:setup:pinned` — optional; installs Chromium, Firefox, and WebKit for Playwright **1.40.1** (required to run the `firefox-pinned` and `webkit-pinned` projects; run after the usual setup when you need those projects locally)
4344
- `yarn test:e2e` — run all E2E tests
4445
- `yarn test:e2e -g "pattern"` — filter by name
4546
- `yarn test:e2e --ui` — Playwright UI mode
@@ -53,6 +54,8 @@ translation proxy. Run them with:
5354
- `yarn test:e2e --project=firefox-pinned`
5455
- `yarn test:e2e --project=webkit-pinned`
5556

57+
If those projects fail because browsers are missing, run `yarn test:e2e:setup:pinned` once so the Playwright 1.40.1 browser binaries are installed alongside the default setup.
58+
5659
## Run unit tests in BrowserStack
5760

5861
- `BS_USERNAME=<username> BS_ACCESS_KEY=<access_key> yarn test:unit:bs`

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"test:script": "node --test --experimental-test-module-mocks './scripts/**/*.spec.*'",
3131
"test:unit:watch": "yarn test:unit --no-single-run",
3232
"test:unit:bs": "node --env-file-if-exists=.env ./scripts/test/bs-wrapper.ts karma start test/unit/karma.bs.conf.js",
33-
"test:e2e:setup": "yarn build && yarn build:apps && yarn playwright install --with-deps && yarn dlx -p playwright@1.40.1 playwright install chromium firefox webkit",
33+
"test:e2e:setup": "yarn build && yarn build:apps && yarn playwright install --with-deps",
34+
"test:e2e:setup:pinned": "volta run --node 20 yarn dlx -p playwright@1.40.1 playwright install chromium firefox webkit",
3435
"test:e2e": "playwright test --config test/e2e/playwright.config.ts",
3536
"test:compat:tsc": "node scripts/check-typescript-compatibility.ts",
3637
"test:compat:ssr": "scripts/cli check_server_side_rendering_compatibility",

‎test/e2e/AGENTS.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ E2E tests use Playwright to test the SDK in real browser environments.
55
## Running E2E Tests
66

77
```bash
8-
# First time setup (builds packages, apps, installs or updates Playwright browsers)
8+
# First-time setup: builds packages and apps; installs or updates Playwright browsers
9+
# for the workspace Playwright version.
910
yarn test:e2e:setup
1011

12+
# Optional: install Chromium, Firefox, and WebKit for Playwright 1.40.1. Required
13+
# locally if you run the firefox-pinned / webkit-pinned projects (see docs/TESTING.md).
14+
yarn test:e2e:setup:pinned
15+
1116
# Run E2E tests locally
1217
yarn test:e2e
1318

0 commit comments

Comments
 (0)