Replace one-shot isVisible() with waitFor() to handle the timing gap
where the SPA route guard is still resolving roles asynchronously.
The role selector renders after the route guard's read() call completes,
and isVisible() may return false if called before that.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When user has exactly 1 active role, chooseRole auto-selects it and
enqueues a router.push to the landing page. loginAndDismissSelectors
now waits for this SPA redirect to complete, so the route guard's
org/department loading runs before page.goto('/clazz') does a full
reload. Also adds extra retry for department loading as fallback.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add JWT payload inspection, networkidle wait, and full localStorage snapshot
to diagnose why loadMyDepartments fails to set CurrentDepartmentId on CI.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CurrentDepartmentId is set but JWT lacks current_department_id.
Adding detailed path/token logs at each iteration to diagnose.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CI test user has 2 orgs, so the router guard redirects to /org/select
before departments can be loaded. Added loginAndDismissSelectors helper
that clicks through org selection then role selection before navigating
to /clazz.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Un-skip clazz-ui FullCalendar test by adding login + role selection
- Use subjectPayload.current_department_id (JWT sub claim) for dept
assertion instead of top-level payload
- Add explicit auth token waits and /clazz navigation for reliability
- Remove unnecessary timeouts and debug logging
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>