Files
workspace/code/g3soft-libs/packages/ui/playwright.docs.config.ts
T
2026-10-12 22:25:41 +08:00

27 lines
899 B
TypeScript

import { defineConfig, devices } from '@playwright/test'
/**
* 量**文档站**的配置。
*
* 组件自带的 playwright.config.ts 指向 playground(5200),那没有 VitePress 的
* .vp-doc 排版上下文,量不到真实文档页上的样式问题(前几轮反复踩坑就在这)。
* 这个配置起 docs 的 preview 服务,用于核对文档站上的实际渲染。
*/
export default defineConfig({
testDir: './e2e-docs',
timeout: 60_000,
reporter: [['list']],
use: {
baseURL: 'http://localhost:4173',
viewport: { width: 1440, height: 900 },
},
webServer: {
command: 'pnpm exec vitepress preview --port 4173 --strictPort',
cwd: 'D:/workspace/code/g3soft-libs/docs',
url: 'http://localhost:4173/ui/data/table',
reuseExistingServer: true,
timeout: 120_000,
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
})