This repository has no description
1import { test, expect } from '@playwright/test';
2
3/**
4 * Auth redirect tests.
5 *
6 * /home and /notifications have server-side guards (verifySessionOnServer).
7 * /settings/* and /profile (bare) redirect via the client-side useAuth fallback.
8 */
9
10const protectedRoutes = [
11 '/home',
12 '/notifications',
13 '/settings',
14 '/profile',
15];
16
17for (const route of protectedRoutes) {
18 test(`unauthenticated ${route} redirects to /login`, async ({ page }) => {
19 await page.goto(route);
20 await expect(page).toHaveURL('/login');
21 });
22}