- Create Team Members page with DataTable, search, and filters - Create Projects page with status badges and workflow - Create placeholder pages for Allocations, Actuals, Reports, Settings, Master Data - Fix navigation config: change /team to /team-members - Remove old Navigation.svelte component - Add comprehensive navigation link E2E tests (16 tests) - Add Team Members and Projects page E2E tests All 16 navigation link tests passing: - Dashboard, Team Members, Projects, Allocations, Actuals - All 5 Reports pages (Forecast, Utilization, Costs, Variance, Allocation) - Admin pages (Settings, Master Data) - Authentication preservation across pages Refs: openspec/changes/p05-page-migrations Closes: p05-page-migrations
47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('Projects Page', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
// Login first
|
|
await page.goto('/login');
|
|
await page.fill('input[type="email"]', 'superuser@headroom.test');
|
|
await page.fill('input[type="password"]', 'password');
|
|
await page.click('button[type="submit"]');
|
|
await page.waitForURL('/dashboard');
|
|
|
|
// Navigate to projects
|
|
await page.goto('/projects');
|
|
});
|
|
|
|
test('page renders with title and table', async ({ page }) => {
|
|
await expect(page).toHaveTitle(/Projects/);
|
|
await expect(page.getByRole('heading', { name: 'Projects' })).toBeVisible();
|
|
await expect(page.getByText('Manage project lifecycle')).toBeVisible();
|
|
await expect(page.getByRole('button', { name: /New Project/i })).toBeVisible();
|
|
});
|
|
|
|
test('search filters projects', async ({ page }) => {
|
|
// Wait for data to load
|
|
await page.waitForTimeout(500);
|
|
|
|
// Search for specific project
|
|
await page.fill('input[placeholder="Search projects..."]', 'Website');
|
|
await page.waitForTimeout(300);
|
|
|
|
// Should show matching results
|
|
await expect(page.getByText('Website Redesign')).toBeVisible();
|
|
});
|
|
|
|
test('status filter works', async ({ page }) => {
|
|
// Wait for data to load
|
|
await page.waitForTimeout(500);
|
|
|
|
// Select status filter
|
|
await page.selectOption('select >> nth=0', 'In Progress');
|
|
await page.waitForTimeout(300);
|
|
|
|
// Should show filtered results
|
|
await expect(page.getByText('In Progress')).toBeVisible();
|
|
});
|
|
});
|