You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Testing: establish the baseline, add Studio end-to-end tests with Playwright (local and on staging) #543
The CI pipeline is good and the unit tests seem to cover a lot. Two things are open: nobody has looked at the whole once to say what the baseline is, and the Studio has no end-to-end tests (docs/testing.md: "End-to-end: not yet").
Earlier plan: #222 (Studio with Playwright, phone with Maestro), closed as not planned on 2026-11-12, written for the first app's Studio. Its decisions are worth re-reading, not binding. The phone on real devices is tracked in #542.
1. Baseline of what exists
Go through the suites in docs/testing.md and the CI lane once: what is covered, what is not, per package and app
Name the gaps that matter and fill them, or note them as accepted
2. Studio end-to-end with Playwright
Two routes:
Local, while developing: a small set that runs against the local Worker and Studio
Staging, the main one: a suite that prepares a seed on staging and then tests what is testable there
Scope: roughly 90% of the Studio should be testable reliably. What depends on device integrations (lights, cameras, a connected phone) is out and not important here.
Open questions
How the seed gets onto staging and how a run leaves it (its own account or workspace, cleaned up after, or staging recreated from production before a run)
When the staging suite runs: by hand before a release, as part of the staging Update, or on a schedule
Whether the local set joins make check and the PR lane or stays a separate target
Where the tests live and which hooks (data-testid, labels) the Studio needs
Done when
docs/testing.md states the baseline and describes both routes: how to run them, how to add a test
To add once the Playwright setup exists: reads after a change (#599, PR #600)
#599 changed what the Studio reads after a change: the one file when only its own record changed, else the whole root. Unit and route tests cover the rule (apps/studio/src/files.test.ts, apps/worker/test/routes/live-root.test.ts). What they cannot cover is each editor passing the right file after its save; that needs the browser.
Tests to write, each watching the network while it acts:
Autosave of each editor (canvas, timeline, flow, shot with a progression, layout, remote): after an edit, the save is followed by GET /api/files/<id> for that file (for a progression also its shot), and by no GET /api/files?project_id=… or ?home=1.
Rename, a new file, a body change (collection colour, preset, device): one GET /api/files/<id>, no root read, and the Files list shows the change in the right place of the order.
Property values: on one file and on several (up to 16) the files are read; on more than 16 the root is read once.
Photo import: per photo no root read while it uploads; the list shows each photo when its preview is stored; one root read when the last upload of the root is done.
Wide changes (move, recycle bin, restore, purge, duplicate, a changed property definition): exactly one root read (list and bin) in the window that made the change.
Two browser contexts on one project: a save in one shows in the other's Files list with one GET /api/files/<id> there; a move in one gives one root read in the other.
A phone upload while the Studio is open (staging, if a phone or a script that uploads like one is part of the seed): the photo appears without a reload.
A helper worth having for all of them: count the requests to /api/files by kind (root list, bin, one file) between two points of a test.
Activity
bubulux commentedon Dec 4, 2026
To add once the Playwright setup exists: reads after a change (#599, PR #600)
#599 changed what the Studio reads after a change: the one file when only its own record changed, else the whole root. Unit and route tests cover the rule (
apps/studio/src/files.test.ts,apps/worker/test/routes/live-root.test.ts). What they cannot cover is each editor passing the right file after its save; that needs the browser.Tests to write, each watching the network while it acts:
GET /api/files/<id>for that file (for a progression also its shot), and by noGET /api/files?project_id=…or?home=1.GET /api/files/<id>, no root read, and the Files list shows the change in the right place of the order.GET /api/files/<id>there; a move in one gives one root read in the other.A helper worth having for all of them: count the requests to
/api/filesby kind (root list, bin, one file) between two points of a test.