test: add CLI and presenter coverage

This commit is contained in:
2026-08-29 18:59:49 +08:00
parent 5224d45994
commit 0cf1f51745
4 changed files with 974 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import { defineConfig } from '@playwright/test'
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
timeout: 30_000,
use: {
baseURL: 'http://127.0.0.1:4173',
viewport: { width: 1440, height: 900 },
},
webServer: [
{
command: 'pnpm demo:build && pnpm exec vite preview examples/content-repo --host 127.0.0.1 --port 4173',
url: 'http://127.0.0.1:4173',
reuseExistingServer: true,
timeout: 120_000,
env: {
...process.env,
PRESENTER_TOKEN: 'test-token',
},
},
{
command: 'pnpm demo:present -- getting-started',
url: 'http://127.0.0.1:4174',
reuseExistingServer: true,
timeout: 120_000,
env: {
...process.env,
PORT: '4174',
PRESENTER_TOKEN: 'test-token',
},
},
],
})