feat: allow bypass of reset-password and verify routes for logged-in users
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m27s

This commit is contained in:
2026-03-05 15:47:42 -05:00
parent bb5330ac17
commit a10836d412

View File

@@ -78,6 +78,22 @@ describe('router auth guard', () => {
expect(path).toBe('/child') expect(path).toBe('/child')
}) })
it('allows logged-in parent user to access /auth/reset-password', async () => {
isUserLoggedInMock.value = true
isParentAuthenticatedMock.value = true
const path = await navigate('/auth/reset-password')
expect(path).toBe('/auth/reset-password')
})
it('allows logged-in child user to access /auth/reset-password', async () => {
isUserLoggedInMock.value = true
isParentAuthenticatedMock.value = false
const path = await navigate('/auth/reset-password')
expect(path).toBe('/auth/reset-password')
})
// ── Unauthenticated users may access /auth ──────────────────────────────── // ── Unauthenticated users may access /auth ────────────────────────────────
it('allows unauthenticated user to access /auth', async () => { it('allows unauthenticated user to access /auth', async () => {