Scaffold Playwright E2E testing - #870
Draft
dvonanderson wants to merge 3 commits into
Draft
dvonanderson wants to merge 3 commits into
dvonanderson wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/testadded as a dev dependency; Chromium browser installedplaywright.config.js-testDir: e2e/, auto-starts/reuses the dev server (yarn start) via Playwright'swebServeroption, Chromium project only for nowe2e/smoke.spec.js- two smoke tests (dashboard summary cards render, top nav links are present) to validate the scaffolding end-to-endpackage.jsonscripts:test:e2e,test:e2e:ui.gitignoreentries forplaywright-report/andtest-results/Important gotcha
Playwright requires Node 20+; this repo's
enginesfield pins Node 18 for the existing ember-cli/QUnit toolchain. This PR does not change the rootenginesfield - Playwright runs as a fully separate process fromember 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 ofplaywright.config.js.Test plan
nvm exec 20 yarn test:e2epasses against a cold-started dev servernvm exec 20 yarn test:e2epasses against an already-running dev server (webServer reuse)@playwright/testrelease that supports Node 18)This PR is intentionally left as a draft - scaffolding only, not ready for real coverage/CI wiring yet.