Why: Plugin pages must mount through a host bridge, and button versus chat command parity needs a check that vitest does not execute as a unit test. Evidence: npx vitest run passed. The Playwright file lives under e2e and is outside the tsconfig include. Impact: loadPluginPage expects mount/unmount. @playwright/test is not a required dependency yet. Refs: docs/proposals/2026-10-01-plugin-contract-v2.md Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
572 B
TypeScript
11 lines
572 B
TypeScript
// 双入口对拍的浏览器侧说明。CI 门禁在 backend command_pairs_test.go:
|
||
// 新内置命令未写入 testdata/command-pairs.json 时 go test 失败。
|
||
// 安装 Playwright 后可用 npx playwright test e2e/command-pairs.spec.ts 做人工抽查。
|
||
import { test, expect } from '@playwright/test'
|
||
|
||
test('command menu and chat share builtin.help', async ({ page }) => {
|
||
test.skip(!process.env.PLAYWRIGHT_BASE_URL, 'set PLAYWRIGHT_BASE_URL to run')
|
||
await page.goto(process.env.PLAYWRIGHT_BASE_URL!)
|
||
await expect(page.getByText('帮助')).toBeVisible()
|
||
})
|