[follow-up] AppViewUI integration test predates role-based home + owner_handle form
closedContext
Surfaced by the T3 (bug a6181d9) SQLite re-verification run: with SOVRN_INTEGRATION=1, TestIntegrationAppViewUI fails at step 1 — home missing title. The page renders correctly; the test’s expectation is stale.
Problem
Commit znmtsqru (role-based auth, non-admin home page) split internal/appview/ui/home.templ by role: admins see “Your domains”, non-admins see “My mailboxes”. The test’s DevDID session (did:plc:uiprobe...) is non-admin, so the "Your domains" assertion (internal/integration/appview_ui_test.go:85) fails. Step 1’s failure masks further drift behind it — notably step 4 posts only address to /domains/{id}/accounts, but the form now requires owner_handle (422 without it, see internal/appview/ui/create_account_test.go:55) or the new_account checkbox.
Task
- Make the step-1 expectation role-aware (non-admin DevDID renders “My mailboxes”).
- Supply owner identity at step 4 (
owner_handleresolvable in the integration env, ornew_account=1); confirm the created mailbox still satisfies the later IMAP-login proof. - Re-run steps 2-7 and fix fallout (domain creation as non-admin, DNS/IMAP-guide strings, secret regex) iteratively. If any step exposes a production regression under the role model rather than test drift, split it into its own bug.
Acceptance
TestIntegrationAppViewUIpasses end-to-end against the live harness (home -> add domain -> DNS records -> add account -> IMAP guide -> app password -> IMAP login). Test-only unless a real regression surfaces.
1 Comment
Fixed (bugs ca92d38 + 1344bf0)
ca92d38 —
internal/integration/apppassword_xrpc_test.go:89,appview_test.go:95now passDid: strPtr(cfg.DevAuth.DID). Both green.1344bf0 —
internal/integration/appview_ui_test.goupdated: non-admin home expects “My mailboxes”; account creation usesnew_account=1; DNS assertions match the Type/Name/Content table; secret extraction reads the<code data-copy>attribute (secret is now chunked into spans). Unique domain per run (ui-probe-<nanos>.test) so the shared harness can’t collide with stale state — full flow green including IMAP login on the pending mailbox.Full suite: 8⁄8 PASS with
SOVRN_INTEGRATION=1; unitjust testgreen; gofmt/vet clean.Harness note
Wiped stale Sept-9
ui-probe.testobjects (domainc0, accountedat 5⁄5 app-password quota, tenantc3) from the dev Stalwart — that staleness was the order-dependent 500, not a code bug. No prod code touched by either fix; both bugs stay open for your review.