add git diffs and permission support

This commit is contained in:
2026-01-19 23:45:03 -05:00
parent 313ac44337
commit 61a2e9b8af
44 changed files with 2051 additions and 267 deletions
+7 -4
View File
@@ -23,10 +23,12 @@ npm run test:ui
The e2e setup automatically manages both servers:
1. **Global Setup** (`global-setup.ts`) - Starts backend (port 3000) and frontend (port 5173)
1. **Global Setup** (`global-setup.ts`) - Starts backend (port 3001) and frontend (port 5174)
2. **Global Teardown** (`global-teardown.ts`) - Stops both servers
3. **Server Utils** (`server-utils.ts`) - Spawns Clojure and Vite processes, waits for health checks
E2E tests use different ports (3001/5174) than dev servers (3000/5173) to allow running tests without interfering with development.
Tests use Playwright's `page` fixture for browser interactions and `request` fixture for direct API calls.
## Test Database
@@ -37,12 +39,13 @@ E2E tests use a separate database (`server/test-e2e.db`) to avoid polluting the
```typescript
import { test, expect } from '@playwright/test';
import { E2E_BACKEND_URL } from '../playwright.config';
test('example', async ({ page, request }) => {
// Direct API call
const response = await request.get('http://localhost:3000/api/sessions');
// Direct API call - use E2E_BACKEND_URL for backend requests
const response = await request.get(`${E2E_BACKEND_URL}/api/sessions`);
// Browser interaction
// Browser interaction - baseURL is configured in playwright.config.ts
await page.goto('/');
await expect(page.locator('h1')).toBeVisible();
});