Migrate wrappers e2e tests from TestCafe to Playwright - #34757
Migrate wrappers e2e tests from TestCafe to Playwright#34757aleksei-semikozov wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the wrappers end-to-end (E2E) suite from TestCafe to Playwright, introducing Playwright-based specs plus a lightweight static server to run against prebuilt wrapper apps, and updating CI to execute the new runner.
Changes:
- Replaced TestCafe
*.test.jswrapper E2E tests with Playwright*.spec.tstests and added Playwright fixtures/config. - Added a static server (
serve.js) + Docker helper to run the suite in a CI-like environment. - Updated dependencies and CI workflow to run Playwright tests and publish Playwright artifacts on failure.
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds @playwright/test to the workspace catalog. |
| pnpm-lock.yaml | Locks @playwright/test (and Playwright) and removes TestCafe from the wrappers E2E dependency set. |
| e2e/wrappers/tests/textbox.test.js | Removes the old TestCafe TextBox E2E test. |
| e2e/wrappers/tests/textbox.spec.ts | Adds Playwright version of the TextBox E2E test. |
| e2e/wrappers/tests/select-box-nested-validator.test.js | Removes the old TestCafe SelectBox/Validator E2E tests. |
| e2e/wrappers/tests/select-box-nested-validator.spec.ts | Adds Playwright versions of the SelectBox/Validator E2E tests. |
| e2e/wrappers/tests/inputs-list-in-form.test.js | Removes the old TestCafe inputs-in-form E2E test. |
| e2e/wrappers/tests/inputs-list-in-form.spec.ts | Adds Playwright version of the inputs-in-form E2E test. |
| e2e/wrappers/tests/gantt-template-state-update.test.js | Removes the old TestCafe Gantt E2E test. |
| e2e/wrappers/tests/gantt-template-state-update.spec.ts | Adds Playwright version of the Gantt E2E test (React-only skip). |
| e2e/wrappers/tests/chat-template-rerender.test.js | Removes the old TestCafe Chat E2E test. |
| e2e/wrappers/tests/chat-template-rerender.spec.ts | Adds Playwright version of the Chat E2E test (React-only skip). |
| e2e/wrappers/tests/button.test.js | Removes the old TestCafe Button E2E test. |
| e2e/wrappers/tests/button.spec.ts | Adds Playwright version of the Button E2E test. |
| e2e/wrappers/test-helpers.js | Removes TestCafe-specific helper utilities. |
| e2e/wrappers/serve.js | Adds an Express static server used by Playwright webServer to serve built apps. |
| e2e/wrappers/runner.js | Removes the custom TestCafe runner. |
| e2e/wrappers/README.md | Adds documentation for running the new Playwright-based wrappers E2E suite. |
| e2e/wrappers/playwright.config.ts | Adds Playwright config (framework ports, baseURL, webServer, CI reporter). |
| e2e/wrappers/package.json | Replaces TestCafe runner scripts with Playwright scripts; adds @playwright/test + cross-env; removes TestCafe. |
| e2e/wrappers/fixtures.ts | Adds a Playwright fixture to expose framework as a test option. |
| e2e/wrappers/docker/run.sh | Adds a helper script to run wrappers E2E tests in a CI-like container. |
| e2e/wrappers/docker/Dockerfile | Adds a container definition matching CI Node + Chrome versions. |
| e2e/wrappers/.gitignore | Ignores Playwright output directories. |
| apps/vue/test.js | Removes placeholder TestCafe playground test file. |
| apps/vue/runner.js | Removes TestCafe runner for the Vue playground. |
| apps/vue/project.json | Removes exclusions that referenced deleted TestCafe test file. |
| apps/vue/package.json | Removes the Vue playground test script that ran TestCafe. |
| apps/react/test.js | Removes placeholder TestCafe playground test file. |
| apps/react/runner.js | Removes TestCafe runner for the React playground. |
| apps/react/project.json | Removes exclusions that referenced deleted TestCafe test file. |
| apps/react/package.json | Removes the React playground test script that ran TestCafe. |
| .github/workflows/wrapper_tests_e2e.yml | Updates CI to rely on Playwright’s webServer and uploads Playwright artifacts on failure. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (4)
e2e/wrappers/docker/run.sh:6
- This script’s prerequisites recommend
pnpm installwithout--frozen-lockfile, which conflicts with the repo’s standard install instructions and can cause mismatched dependency trees vs CI. Usepnpm install --frozen-lockfilein the instructions.
# pnpm install
e2e/wrappers/README.md:22
- Repo setup guidance elsewhere requires using a frozen lockfile; using plain
pnpm installhere can lead to lockfile drift and CI-only failures. Update the command to use--frozen-lockfile.
pnpm install
e2e/wrappers/serve.js:16
--portis not validated. If it’s omitted or non-numeric,Number(argv.port)becomesNaNand Express will attempt to listen on an invalid port, producing a confusing runtime error. Validate the parsed port and exit with a clear message.
const argv = minimist(process.argv.slice(2));
const framework = argv.framework;
const port = Number(argv.port);
const distDir = DIST_DIRS[framework];
e2e/wrappers/tests/inputs-list-in-form.spec.ts:8
- Test title has a grammatical error ("should adding and deleting"). Consider rephrasing to improve readability in test reports.
test('Phone inputs should adding and deleting correctly', async ({ page }) => {
…s and test title fixes
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (2)
e2e/wrappers/README.md:18
- The layout table is using
||at the start of each row, which renders as an extra empty column in Markdown. Use single leading/trailing pipes so the table displays correctly.
| Path | Purpose |
|------------------------|----------------------------------------------------------------------|
| `builders/*` | Host applications that render the examples for each framework |
| `examples/*` | Examples under test, one folder per scenario and framework |
| `tests/*.spec.ts` | Playwright specs |
e2e/wrappers/docker/run.sh:8
docker/run.shmounts the repo (including node_modules) from the host into a linux/amd64 container. This can fail on macOS/Windows (or non-amd64 hosts) because native dependencies (e.g. esbuild) won’t match the container OS/arch. Please document this limitation so the script’s prerequisites are clear.
# The repository is mounted as is, so dependencies must be installed and
# the app under test built on the host first:
#
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (2)
e2e/wrappers/README.md:39
- The README states that dependencies are taken from the host, but the container is pinned to linux/amd64. If
node_moduleswas installed on macOS/Windows (or non-amd64), platform-specific binaries (e.g., Playwright driver, esbuild) typically won’t run in the container. Clarify that the host install/build must be produced for linux/amd64 (or instruct how to install inside the container).
The container mirrors the OS, Node and Google Chrome the tests get on CI. Dependencies and
application builds are taken from the host:
e2e/wrappers/docker/run.sh:5
- This script instructs installing dependencies on the host, but the container is forced to linux/amd64. If the host
pnpm installran on a different OS/arch, mountednode_modulescan contain incompatible native binaries (Playwright driver, esbuild, etc.) and the run will fail. Add a note that the host install must be linux/amd64 (or that dependencies should be installed inside a linux/amd64 container/VM).
# The repository is mounted as is, so dependencies must be installed and
# the app under test built on the host first:
No description provided.