Skip to content

Scaffold Playwright E2E testing - #870

Draft
dvonanderson wants to merge 3 commits into
ember-migrationfrom
dvonanderson/feature/playwright-e2e-setup
Draft

dvonanderson wants to merge 3 commits into
ember-migrationfrom
dvonanderson/feature/playwright-e2e-setup

Conversation

@dvonanderson

Copy link
Copy Markdown
Contributor

Summary

Initial scaffolding to introduce Playwright as an end-to-end testing layer alongside the existing Ember/QUnit suite. No app code changes - this only adds the tooling and a couple of smoke tests to validate the setup works.

Why Playwright, alongside (not replacing) the QUnit suite: the existing suite covers component/service-level correctness well, but has essentially no true end-to-end coverage (tests/acceptance/ has a single test) - several real bugs found during the recent Ember 4 migration work only surfaced via manual, full-browser verification, not the automated suite. Playwright drives a real browser against the actual running app rather than Ember's internal test build, which better exercises full user flows, and won't need to change in lockstep with future Ember/ember-qunit internals. The plan is to keep this scoped to a handful of critical flows (record create/edit/publish, import/export) rather than duplicate what the QUnit suite already covers well.

What's included

  • @playwright/test added as a dev dependency; Chromium browser installed
  • playwright.config.js - testDir: e2e/, auto-starts/reuses the dev server (yarn start) via Playwright's webServer option, Chromium project only for now
  • e2e/smoke.spec.js - two smoke tests (dashboard summary cards render, top nav links are present) to validate the scaffolding end-to-end
  • package.json scripts: test:e2e, test:e2e:ui
  • .gitignore entries for playwright-report/ and test-results/

Important gotcha

Playwright requires Node 20+; this repo's engines field pins Node 18 for the existing ember-cli/QUnit toolchain. This PR does not change the root engines field - Playwright runs as a fully separate process from ember serve/ember test, so there's no actual conflict, but e2e commands need to be run under Node 20+ (e.g. nvm exec 20 yarn test:e2e). Documented as a comment at the top of playwright.config.js.

Test plan

  • nvm exec 20 yarn test:e2e passes against a cold-started dev server
  • nvm exec 20 yarn test:e2e passes against an already-running dev server (webServer reuse)
  • Decide on Node-version handling for CI before merging out of draft (bump CI's Node for this job, or pin an older @playwright/test release that supports Node 18)
  • Flesh out real e2e coverage for at least one critical flow before merging out of draft

This PR is intentionally left as a draft - scaffolding only, not ready for real coverage/CI wiring yet.

@dvonanderson dvonanderson self-assigned this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant