Repository navigation
web/router: Fix sidebar expansion, add persistence - #26218
Conversation
1fc77d4 to
7df56d1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26218 +/- ##
=======================================
Coverage 91.98% 91.98%
=======================================
Files 1174 1174
Lines 76184 76184
Branches 4056 4056
=======================================
Hits 70081 70081
Misses 6061 6061
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Playwright e2e — ✅ Passed
Download the HTML report · Workflow run gh run download 35251080546 -n playwright-report -D playwright-report
npx playwright show-report playwright-report |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-0d7696f597968a93ec0d63b24c3af0819d87469e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-0d7696f597968a93ec0d63b24c3af0819d87469eAfterwards, run the upgrade commands from the latest release notes. |
selectSearchValue did not await its own fill, so the option list was queried before the typed filter landed -- a race every caller shared, and one that hides itself: the control still reports a value, and the form saves without the field. Also accept a pattern for the field label. Matching by accessible name is substring-based, and a picker whose name comes from its placeholder cannot otherwise be told apart from a neighbouring control with a longer name.
Three failures, two causes.
The pending-offboardings filter is an ak-switch-input, which renders the
PatternFly switch: .pf-c-switch__toggle covers the input, so clicking the
checkbox by role is always intercepted. Drive it through form.setInputCheck,
which exists for this.
The raw-event assertions matched page.locator("pre"), which is ambiguous
whenever the dev-mode "consecutive requests" notification is on screen, since it
renders a pre of its own. Scope them to ak-event-view.
Mark the suite serial. Every test drives "Execute due user offboardings", a
single instance-wide schedule that drains every due offboarding, including ones
another test has scheduled and not yet asserted on.
The suite's lockdown flow came from web/test/blueprints, but nothing applies that directory -- not CI, which points AUTHENTIK_BLUEPRINTS_DIR at ./blueprints, and not a local run. The flow never existed, so every test failed at the brand's "Account lockdown flow" picker. CI did not catch it because the suite skips without an enterprise license. Create the flow, stage, and binding through the admin UI in beforeAll instead, and drop the blueprint. Idempotent on the binding rather than the flow: a run interrupted between the two leaves a flow that exists but does nothing, which a flow-only check would skip over. The stage name carries a random suffix so a partially-completed earlier run cannot collide, and the completion flow is selected by string so the picker filters -- passing a pattern leaves the field empty, and the stage then saves silently, failing much later with "Self-service account lockdown requires a completion flow".
searchRows submitted once and returned, so the caller's count assertion polled a DOM that had stopped changing. When a row landed after that fetch the table kept its previous result set and the assertion could only time out, however long it waited. Driving the browser by hand against the same instance shows the table does refetch on every submit, including when the query is unchanged, so re-submitting is what picks the row up. Take the expected count and re-submit until it holds.
runDueOffboardings searched the schedules table for the schedule's display description. The API searches id, identifier, _uid, actor_name and the rel_obj fields (authentik/tasks/schedules/api.py), not the description, so that query matches nothing and filters the table to empty. The step nevertheless passed most of the time, because a fill+Enter that fails to submit leaves the table unfiltered and the row therefore present. Two defects cancelling out: the run failed exactly when the search did work. Forcing the search to land on every attempt, while hardening this same step earlier, made it fail every time -- which is what put the mechanism beyond doubt. Search by actor name, which the API matches and the row text contains.
Details
This PR fixes a regression introduced into the admin sidebar where the current category is not expanded. Additionally, the expansion state of other categories is now persisted to session storage for a consistent experience when navigating between interfaces.