E2E (Playwright, motir-core) + acceptance video — claim a subdomain, add a custom domain, watch its certificate states, make it primary, rename and keep the old address redirecting
Opened by Zhu Yue ·
The browser walk of the application half of the story's verification recipe — a project admin claims a subdomain, adds a custom domain, follows the records, verifies, watches the state reach issued, makes it primary, renames the subdomain and sees the old name kept as a redirecting alias — recorded at a pace a person can watch and published to this card. The public-side half (a visitor on the new host) is the marketing E2E; this card asserts what the application shows about the same events.
The lane, and the seams it needs — verified before writing
- The cloud lane. The pane exists only when
MOTIR_CLOUD=true; this repository keeps a Playwright lane whose server env sets it (thecloud-*.spec.tsfamily — readplaywright.config.tsand the lane's server env, and put the spec in THAT lane; a spec in the default lane would pass vacuously because the rail entry would not mount). - Two external dependencies the flow crosses, and a seam for each, or the asserted states are unreachable: (1) the Fly certificates port — the lifecycle must expose a test-only provider selected by the lane's server env (an in-memory
CertificateProviderthat reports issued on the firstcheck); (2) the_motir-verifyTXT lookup — a resolver seam selected the same way. Read the lifecycle's shipped code for both seams before writing a line; if either is absent, this card STOPS and files the gap against the lifecycle card rather than stubbing around it in the browser (type-test.mdtell (d): a lane that cannot reach the asserted state stays green for ever). - The job — the state moves from
pending_certificatetoissuedwhen the status job runs; the lane triggers one run through the engine's test hook (the way other job specs do — find the precedent intests/e2e/before assuming one) or the spec waits on the pane's 30 s tick with a shortened interval the lane's env sets.
The spec — tests/e2e/cloud-public-address.spec.ts
- Sign in as a workspace admin of a public project; open Settings → Public address from the rail; the pane renders the unclaimed subdomain card.
- Type a reserved label → the inline error; type a valid label → the live preview updates; claim → the address row appears with copy and open.
- Add a domain → type
roadmap.example.test→ the TXT and CNAME records render with copy buttons; Verify now → the row readsverifying→ after the job run,issued. - Make primary → the row reads primary and the consequence line is shown.
- Rename the subdomain → the warning names the retained alias and the remaining count → confirm → the new address renders and the old label is listed as an alias that redirects.
- Sign in as a workspace
member→ the pane is read-only (panel 8); on afree-tier fixture org, Add a domain is disabled with the upgrade prompt (panel 3b). - The empty, loading and error states: the domains list empty; the loading skeleton; the error state when the addresses read fails (stubbed at the route).
- The recording of steps 1–5 is paced for a person; the agent attaches the video to this card with
attach_file.
Waits are on authoritative signals — the row's status text, the toast, the response — never on timers (CLAUDE.md § E2E discipline).
Acceptance criteria
- The spec passes in the cloud lane on the PR with video and trace produced, walking all eight steps; a run in the default lane is not what closes this card.
- Step 3 reaches
issuedthrough the lifecycle's own test provider seam and a real job run or tick — not through a browser-side stub of the API; the PR names the seam it used and where it is defined. - Step 5 asserts the old label appears as an alias after the rename; step 6 asserts the read-only and tier-gated renderings; step 7 distinguishes the three states.
- The acceptance video is attached to this card and each landing is on screen long enough to read.
- No production code changes; no file outside
motir-coreis touched.
Context refs
motir-core/playwright.config.ts·tests/e2e/cloud-*.spec.ts·CLAUDE.md§ E2E discipline — the lane and its env- pane 1 · pane 2 — the surface; the lifecycle · the job — the seams and the state moves
motir-core/docs/decisions/acceptance-video.md— the agent publishes the clip; MOTIR-4038 — the publish-affordance E2E, the closest precedent in this repository- MOTIR-3878 — the verification recipe, steps 1, 2 and 4
Discussion
No comments yet.
Adding to this discussion signs you in on app.motir.co and brings you back to this request.