test: playkit v0.3.1 adoption, Zod widening, PROD smoke, NextAuth write gates #68
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/admin-manage-users-e2e"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
@levkin/playkittov0.3.1and land the network-interception work it unblocked:startNetworkErrorMonitoron gallery/search/upload/manage-users, plus realinterceptNetworkCallspies replacing brittlewaitForResponse/text-scraping on upload and the search-filter UI.TokenResponse+/auth/meUserResponse, and the Prisma-backed gallerySearchResponse.prod.smoke.spec.ts) — opt-in viaPROD_BASE_URL; verified against a real public host, stays a no-op skip until the PROD LXC exists.viewer.write-gates.spec.ts) — provisioned a third, independent auth-DB viewer user (hasWriteAccess=false) via ansible'sprovision-punimtag-e2e-user.py; viewer 403s vs admin passes-through onPOST /api/faces/{id}/identify.admin-frontendVitest coverage + CI job (previously had no test infra).res.data: unknown/ Mailpit-vs-Mailtrap TS errors in mail/catalog specs.devHEAD, which blocks two other uncommitted specs left as-is (not part of this PR).Test plan
npx playwright test --project=setup --project=chromium): 35 passed, 6 skipped (mail specs need Mailpit env)tsc --noEmitclean acrosse2e/- upload.smoke.spec.ts / gallery.search-filters.spec.ts: replace waitForResponse/text-scrape with typed interceptNetworkCall spies (status + JSON shape) on the real upload POST and the filtered /api/search GET. - api.fastapi-login.spec.ts: Zod-validate the FastAPI TokenResponse and /auth/me UserResponse instead of loose casts. gallery.search-filters.spec.ts gets the same treatment for the Prisma-backed SearchResponse. - prod.smoke.spec.ts: opt-in (PROD_BASE_URL) health + login-page check on a real PROD host; skips as a no-op until the PROD LXC exists (none does yet per `pct list` — see ROADMAP). - viewer.write-gates.spec.ts: NextAuth (browser-session) hasWriteAccess gate on POST /api/faces/{id}/identify — viewer 403s, admin passes through. Provisioned a third, independent auth-DB user (e2e-viewer@levkine.ca, hasWriteAccess=false) for this via ansible's provision-punimtag-e2e-user.py (see that repo for the vault/Infisical/Gitea/Vaultwarden side).statusBadgeText(email) after deactivating a user hung for the full test timeout: ManageUsersContent.handleEditUser() refetches the list with the current statusFilter ('active' by default) after every save, so the just-deactivated row silently drops out of view — the locator then waits forever for a row that filter will never show again (no actionTimeout is configured, so only the outer test timeout eventually kills it). Add ManageUsersPanel.showAllUsers() and switch to it before reading the badge. Also gave the test more headroom (60s -> 120s) since it drives two full UI logins plus create/edit/verify against a shared-CI DEV LXC. Verified: full local suite green (37 passed, 6 skipped) against DEV.