- Add dark industrial theme with brand color #c20600 and CSS variables - Create Header component with version display and user dropdown menu - Create StatusBar with connection indicator and project/session display - Create ProjectManager page with CRUD, list view, and inspector - Add JWT Bearer token to API requests for authenticated endpoints - Add project API endpoints (GET/POST/PUT/DELETE /api/v1/projects) - Add ProjectService methods: findById, findBySlug, delete - Add unit tests for project API endpoints - Add Playwright E2E tests for projects flow - Update UI design guide with implementation details - Fix: empty JSON body parsing in web-app.ts middleware
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('Projects API', () => {
|
|
test('should sign in and fetch projects', async ({ page }) => {
|
|
await page.goto('https://code-dev.g4dge7.com:5174/sign-in');
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
await page.fill('#email', 'rob@digitaltelepresence.com');
|
|
await page.fill('#password', 'ionfrali');
|
|
await page.click('button[type="submit"]');
|
|
await page.waitForTimeout(3000);
|
|
|
|
const userData = await page.evaluate(() => localStorage.getItem('dtp_user'));
|
|
expect(userData).toBeDefined();
|
|
|
|
await page.goto('https://code-dev.g4dge7.com:5174/projects');
|
|
await page.waitForLoadState('networkidle');
|
|
await page.waitForTimeout(3000);
|
|
|
|
const content = await page.content();
|
|
expect(content).not.toContain('Please sign in to view projects');
|
|
});
|
|
|
|
test('should show project manager after sign in', async ({ page }) => {
|
|
await page.goto('https://code-dev.g4dge7.com:5174/sign-in');
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
await page.fill('#email', 'rob@digitaltelepresence.com');
|
|
await page.fill('#password', 'ionfrali');
|
|
await page.click('button[type="submit"]');
|
|
await page.waitForTimeout(3000);
|
|
|
|
await page.goto('https://code-dev.g4dge7.com:5174/projects');
|
|
await page.waitForLoadState('networkidle');
|
|
await page.waitForTimeout(2000);
|
|
|
|
const content = await page.content();
|
|
expect(content).toContain('[New Project]');
|
|
});
|
|
}); |