31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
/**
|
|
* Smoke tests for the dashboard shell.
|
|
* These tests verify the foundational page renders and is accessible.
|
|
*/
|
|
test.describe('Dashboard', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
// Navigate to the dashboard — locale redirect happens automatically.
|
|
await page.goto('/en/dashboard');
|
|
});
|
|
|
|
test('renders the dashboard page title', async ({ page }) => {
|
|
await expect(page.getByRole('heading', { name: 'Dashboard', level: 1 })).toBeVisible();
|
|
});
|
|
|
|
test('renders the stats grid section', async ({ page }) => {
|
|
await expect(page.getByRole('region', { name: 'Summary statistics' })).toBeVisible();
|
|
});
|
|
|
|
test('page has correct document title', async ({ page }) => {
|
|
await expect(page).toHaveTitle(/DwellOps/);
|
|
});
|
|
|
|
test('page has no critical accessibility violations', async ({ page }) => {
|
|
// Basic landmark checks — full axe integration should be added in CI.
|
|
await expect(page.getByRole('main')).toBeVisible();
|
|
await expect(page.getByRole('banner')).toBeVisible();
|
|
});
|
|
});
|