chore(test): Initialize Playwright E2E infrastructure

This commit is contained in:
2026-02-21 09:28:26 -08:00
parent 43009e4740
commit 64c3293c73
2 changed files with 33 additions and 0 deletions

View File

@@ -18,5 +18,17 @@ services:
volumes:
- ./test_data:/usr/share/nginx/html:ro
playwright:
image: mcr.microsoft.com/playwright:v1.49.0-jammy
volumes:
- .:/work
working_dir: /work
environment:
- CI=true
depends_on:
- silverbullet-test
- mock-ics-server
command: npx playwright test
volumes:
sb-test-space:

21
playwright.config.ts Normal file
View File

@@ -0,0 +1,21 @@
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
baseURL: 'http://silverbullet-test:3000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});