Files
nuzlocke-tracker/.beans/archive/nuzlocke-tracker-liz1--fix-frontend-layout-tests-for-auth-aware-navigatio.md
2026-03-22 08:56:06 +01:00

14 lines
595 B
Markdown

---
# nuzlocke-tracker-liz1
title: Fix frontend Layout tests for auth-aware navigation
status: completed
type: bug
priority: normal
created_at: 2026-03-21T10:41:51Z
updated_at: 2026-03-21T10:42:30Z
---
Layout.test.tsx fails because nav links are now auth-dependent. Tests expect logged-in admin links but render with no user. Fix by mocking useAuth.
## Summary of Changes\n\nMocked `useAuth` in Layout.test.tsx instead of using real AuthProvider. Added separate test groups for logged-out and logged-in-as-admin states, verifying correct nav links appear in each. All 118 frontend tests pass.