learning_ai_common_plat/dashboards/admin-web/e2e/navigation.spec.ts
saravanakumardb1 2d54795c30 feat(dashboards): migrate admin + tracker dashboards to common-plat as product-agnostic
- Copy admin-dashboard-web → dashboards/admin-web
- Copy tracker-dashboard-web → dashboards/tracker-web
- Update pnpm-workspace.yaml to include dashboards/*
- Replace file: refs with workspace:* for @bytelyst/* packages
- Replace all hardcoded LysnrAI/lysnn.com branding with generic platform refs
- Make telemetry use NEXT_PUBLIC_PRODUCT_ID / PRODUCT_ID env vars
- Update mock credentials, seed data, invitation codes, placeholders
- Update READMEs, e2e tests, unit tests for product-agnostic content
- Both dashboards pass tsc --noEmit clean
2026-02-28 02:17:35 -08:00

21 lines
714 B
TypeScript

import { test, expect } from '@playwright/test';
test.describe('Admin Navigation & Protected Routes', () => {
test('redirects unauthenticated user to login', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveURL(/\/login/);
});
test('login page is responsive on mobile viewport', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 667 });
await page.goto('/login');
await expect(page.getByText('Platform Admin')).toBeVisible();
await expect(page.getByLabel('Email')).toBeVisible();
});
test('admin login page has correct title', async ({ page }) => {
await page.goto('/login');
await expect(page).toHaveTitle(/admin/i);
});
});