|
|
@@ -171,3 +171,49 @@ should fire (verify with the Network panel open).
|
|
|
- The **Reset** button itself disappears.
|
|
|
- Reload the page — nothing returns (all five localStorage keys
|
|
|
cleared/reset to empty state).
|
|
|
+
|
|
|
+## Phase 14 — Hamburger menu
|
|
|
+
|
|
|
+Runs with any signed-in user. The header primary links (Sprints,
|
|
|
+New sprint) and the user badge stay inline; Workers / Users / Audit
|
|
|
+log / Sign out live behind the new hamburger button on the right.
|
|
|
+
|
|
|
+1. **Signed-in admin: dropdown contains Workers / Users / Audit log /
|
|
|
+ Sign out.**
|
|
|
+ - Sign in as an admin (see Setup).
|
|
|
+ - Click the hamburger button on the right of the header.
|
|
|
+ - Expected: panel opens immediately below the button with four
|
|
|
+ rows in order: **Workers**, **Users**, **Audit log**, a thin
|
|
|
+ `<hr>` divider, **Sign out**. `aria-expanded="true"` on the
|
|
|
+ trigger. Each row has `role="menuitem"`; the panel has
|
|
|
+ `role="menu"`. Clicking **Workers** navigates to `/workers`
|
|
|
+ and closes the menu.
|
|
|
+
|
|
|
+2. **Signed-in non-admin: dropdown contains only Sign out.**
|
|
|
+ - Sign in as a non-admin user (demote yourself from `/users`
|
|
|
+ while logged in as a second admin, or seed a user with
|
|
|
+ `is_admin=0` directly).
|
|
|
+ - Click the hamburger.
|
|
|
+ - Expected: panel contains a single **Sign out** row — no
|
|
|
+ Workers / Users / Audit log, no `<hr>` divider. The primary
|
|
|
+ **New sprint** link is already hidden for non-admins (admin
|
|
|
+ gate lives on the anchor itself).
|
|
|
+
|
|
|
+3. **Outside-click and Escape close the menu; focus returns to
|
|
|
+ trigger on Escape.**
|
|
|
+ - Open the menu (hamburger click).
|
|
|
+ - Click anywhere in the page outside the panel (e.g. the
|
|
|
+ Sprint Planner wordmark or the main content). Expected:
|
|
|
+ panel closes, `aria-expanded="false"`.
|
|
|
+ - Re-open the menu. Press **Escape**. Expected: panel closes
|
|
|
+ AND the hamburger button regains keyboard focus (visible via
|
|
|
+ the focus ring).
|
|
|
+
|
|
|
+4. **Sign out from the menu still posts with CSRF and logs out.**
|
|
|
+ - Open the menu → click **Sign out**.
|
|
|
+ - Expected: browser POSTs to `/auth/logout` (Network panel
|
|
|
+ shows a 302 with `_csrf` in the form payload), session is
|
|
|
+ cleared, and the page redirects to `/auth/login` (or the
|
|
|
+ public home with a "Sign in" CTA). `audit_log` has a new
|
|
|
+ `LOGOUT user` row. No JS-driven POST — the native `<form>`
|
|
|
+ carries the `_csrf` hidden input and submits the usual way.
|