The previous loginAsStudent only waited 2s after org switch, but
on subsequent page.goto the route guard re-evaluated and could
redirect away. Navigate to a known student page to settle the
Vue app state, matching the pattern in teacher-switching.spec.ts.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
loginAndGetJwt / loginAsStudent no longer wait 120s for text patterns
that may not appear. Instead they wait for Authorization in localStorage,
which is faster and more reliable.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The mocked detail page tests were using localStorage fake JWTs, but the
frontend auth guard in router.beforeEach requires BOTH Authorization and
HtySudoToken to be present — without both, it redirects to / before the
detail component ever mounts, so the route mock was never reached.
Rewrite to use real student login first, then navigate with mocks active.
Tests 11-13: login → mock API → navigate to detail page → assert.
Test 14: fix .group-sections assertion for packages without course items.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
index.vue now only shows CoursePackageStore when org_id is present
in URL query params. Update the test accordingly.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>