Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ See `test/e2e/AGENTS.md` for the full E2E testing guide (setup, writing tests, c

Quick commands:

- `yarn test:e2e:setup` — first-time setup
- `yarn test:e2e:setup` — first-time setup (builds packages and apps, then installs browsers for the workspace Playwright version)
- `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)
- `yarn test:e2e` — run all E2E tests
- `yarn test:e2e -g "pattern"` — filter by name
- `yarn test:e2e --ui` — Playwright UI mode
Expand All @@ -53,6 +54,8 @@ translation proxy. Run them with:
- `yarn test:e2e --project=firefox-pinned`
- `yarn test:e2e --project=webkit-pinned`

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.

## Run unit tests in BrowserStack

- `BS_USERNAME=<username> BS_ACCESS_KEY=<access_key> yarn test:unit:bs`
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"test:script": "node --test --experimental-test-module-mocks './scripts/**/*.spec.*'",
"test:unit:watch": "yarn test:unit --no-single-run",
"test:unit:bs": "node --env-file-if-exists=.env ./scripts/test/bs-wrapper.ts karma start test/unit/karma.bs.conf.js",
"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",
"test:e2e:setup": "yarn build && yarn build:apps && yarn playwright install --with-deps",
"test:e2e:setup:pinned": "volta run --node 20 yarn dlx -p playwright@1.40.1 playwright install chromium firefox webkit",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid requiring Volta for the pinned setup

issue: In a checkout where Yarn is available but volta is not on PATH, this newly documented setup path exits before installing the pinned browsers (yarn test:e2e:setup:pinned currently fails with command not found: volta). Since the repo setup instructions only require Yarn and this script is now the way to prepare the firefox-pinned/webkit-pinned projects locally, contributors who do not use Volta cannot run those projects; wrap the Node 20 workaround in a repo-managed script or document/enforce Volta before relying on this command.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They will figure it out!

"test:e2e": "playwright test --config test/e2e/playwright.config.ts",
"test:compat:tsc": "node scripts/check-typescript-compatibility.ts",
"test:compat:ssr": "scripts/cli check_server_side_rendering_compatibility",
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ E2E tests use Playwright to test the SDK in real browser environments.
## Running E2E Tests

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

# Optional: install Chromium, Firefox, and WebKit for Playwright 1.40.1. Required
# locally if you run the firefox-pinned / webkit-pinned projects (see docs/TESTING.md).
yarn test:e2e:setup:pinned

# Run E2E tests locally
yarn test:e2e

Expand Down
Loading