website refactor
This commit is contained in:
@@ -70,6 +70,22 @@ test.describe('Website Route Coverage & Failure Modes', () => {
|
||||
expect(capture.getUnexpectedErrors(), capture.format()).toHaveLength(0);
|
||||
});
|
||||
|
||||
test('Public Navigation Presence (Unauthenticated)', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
|
||||
// Top nav should be visible
|
||||
await expect(page.getByTestId('public-top-nav')).toBeVisible();
|
||||
|
||||
// Login/Signup actions should be visible
|
||||
await expect(page.getByTestId('public-nav-login')).toBeVisible();
|
||||
await expect(page.getByTestId('public-nav-signup')).toBeVisible();
|
||||
|
||||
// Navigation links should be present in the top nav
|
||||
const topNav = page.getByTestId('public-top-nav');
|
||||
await expect(topNav.locator('a[href="/leagues"]')).toBeVisible();
|
||||
await expect(topNav.locator('a[href="/races"]')).toBeVisible();
|
||||
});
|
||||
|
||||
test('Role-Based Access (Auth, Admin & Sponsor)', async ({ browser, request }) => {
|
||||
const roles: ScenarioRole[] = ['auth', 'admin', 'sponsor'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user