mirror of
https://github.com/goauthentik/authentik.git
synced 2026-08-30 18:51:39 -07:00
`session.login()` defaulted `to` to the flow pathname and then waited on it after submitting, so `waitForURL` matched the page it was already on and returned before the post-login redirect landed. Callers that passed `to` explicitly happened to dodge this; the four provider tests call `login()` bare and ran their first step against the login screen. `to` is now only the destination — pre-login navigation falls back to the flow page, and with no destination the wait is for the flow pathname to be *left*, raced against the auth-failure alert so the deliberate bad-credential tests still return. `form.search()` matched anything named `/search/i` on the whole page. On pages that mount a wizard that also picks up the dual-list-select boxes for scopes, sources, and providers — seven elements on the providers page, so strict mode failed. Scoped to `ak-table-search`, which keeps the match role-based: tables render either a plain searchbox or a query-language combobox. Provider tests also needed an explicit destination; they were relying on the bare `login()` landing somewhere useful, and akadmin defaults to `/if/user/`. Serial full-suite run goes from 26 passed / 10 failed to 30 passed / 6 failed. The remaining six fail on this base independently of these fixes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>