test(e2e): un-fixme form-validation + auth-ui to verify AC7 on staging (PMS-519) #364
Loading…
Reference in a new issue
No description provided.
Delete branch "test/PMS-519-unfixme-form-validation"
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?
What
PMS-519: un-fixme the AC7
form-validationspec (and theauth-uilogin canary it shares a login with), so the e2e run against staging empirically verifies the two preconditions.form-validation.spec.ts:test.describe.fixme->test.describe.auth.spec.ts: thelogin + logout round-triptest.fixme->test.Why both
The form-validation spec does its own
loginViaSpaand runs after thesetupproject - the exact condition PMS-148 quarantinedauth-uifor ("login stalls when run after setup"). PMS-148 is now marked Done, butauth.spec.tswas never re-activated, so the login is not actually proven green in CI. Re-activating both together is the real test of whether PMS-148's fix works.This is the verification step (read the e2e result)
The e2e workflow runs both against staging:
fixmeand re-open PMS-148.[setup] spaBundlesdiagnostic). Re-fixmeform-validation and wait for the redeploy.Verified locally:
npx playwright test --listshows both theauth-uiandform-uitests as runnable (no longer skipped).Run 2531's instrumented failure pinned the root cause: `page.goto('/tickets/new')` does a full document load that reboots the WASM SPA and wipes the in-memory bearer. The app then silently re-auths from the persisted OP cookies, and its `/auth/callback` redirects to the DEFAULT route `/dashboard`, discarding the deep-linked `/tickets/new`. The URL trail ended on `/dashboard`, so the `Create Ticket` button never rendered and the click timed out. Switch both form navigations to in-app router `Link` clicks (sidebar `a[href="/tickets"]` -> list-page `a[href="/tickets/new"]`, and the same for contacts). Clicking a Dioxus `Link` is client-side routing: the single WASM instance stays alive, the bearer survives, and the requested create form actually renders. `.first()` guards the list page rendering the New-X affordance twice (header action + empty-state CTA), and an explicit `waitFor` on each submit button absorbs the client-route transition before the click. The diagnostic wrapper and the `auth.spec.ts` re-`fixme` from the previous commit stay: form-ui runs alone (two logins, under the rate-limit cap) and folds the URL trail into any thrown error. The deep-link-drops-route behaviour the trail exposed (a cold load of `/tickets/new` while holding a valid OP session lands on `/dashboard`) is a real SPA bug, but separate from this AC7 spec; tracked apart. #PMS-519