mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-12 04:29:51 +08:00
npm run test:e2e starts dist/index.js over the MCP SDK with DRAWIO_PREVIEW_UI=shell, opens the URL start_session returns in headless Chromium, and checks that the bundled draw.io loads without console errors and that the theme toggle switches draw.io in place.
17 lines
519 B
TypeScript
17 lines
519 B
TypeScript
import { defineConfig } from "@playwright/test"
|
|
|
|
// Browser tests of the built package (npm run build first): each spec
|
|
// starts the MCP server itself over stdio, so there is no web server here.
|
|
// Playwright comes from the repository root (npm ci there).
|
|
export default defineConfig({
|
|
testDir: "./tests/e2e",
|
|
timeout: 90_000,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
reporter: "list",
|
|
use: {
|
|
browserName: "chromium",
|
|
trace: "retain-on-failure",
|
|
},
|
|
})
|