/** * CI 冒烟测试(不依赖任何外部服务/DB) * ================================================================ * 用途:在 CI 中验证 Playwright + Chromium headless 能真实拉起浏览器, * 作为 e2e 套件的可执行入口(真实 UI e2e 依赖部署环境 + DB, * CI 无内网访问,仅做拉起验证 + spec 收集校验)。 * 注意:本 spec 必须保持零外部依赖(不用 baseURL、不调接口), * 否则 CI 中会因无后端而失败。 */ const { test, expect } = require('@playwright/test'); test('[CI-smoke] Chromium headless 拉起并渲染本地 HTML', async ({ page }) => { await page.goto('data:text/html,

ok

'); await expect(page.locator('#t')).toHaveText('ok'); });