/** * BDD E2E Test: Dashboard Error States and Edge Cases * * Tests error handling and edge cases for the dashboard: * - Dashboard access without authentication * - Dashboard access with network errors * - Dashboard access with API errors * - Dashboard access with no data available * * Focus: Final user outcomes - what the driver experiences in error scenarios */ import { expect, test } from '@playwright/test'; test.describe('Dashboard Error States', () => { test('Unauthenticated user is redirected to login when accessing dashboard', async ({ page }) => { await page.goto('/dashboard'); await page.waitForURL('**/auth/login**'); await expect(page.getByTestId('login-form')).toBeVisible(); }); });