docs: tighten Workbench transient DOM assertions
This commit is contained in:
@@ -88,6 +88,7 @@ bun run e2e:workbench -- --project=chromium
|
||||
- 在 issue/CLI 选中的 node/lane workspace 或其独立 worktree 上运行,不在 master server 本地运行。
|
||||
- 同源 fake-server 只提供正式 API 契约,覆盖 `/auth/*`、workspace、conversation list/detail、turn snapshot、trace event page、Workbench event stream、Performance summary 等当前用例所需端点。
|
||||
- 测试断言优先使用用户可见文本、ARIA role 和稳定 DOM 标识;不要通过内部 store、localStorage、数据库或 live API 直接判定通过。
|
||||
- 非终态瞬时不变量必须用立即 DOM 快照断言:例如 running/pending 阶段要求 final response 为空时,先定位当前 agent card,再用 `locator.evaluate` / `page.evaluate` 直接读取 `.message-markdown.message-text` 数组并立刻判断;不要用会自动等待的 `expect(locator).toHaveCount(0)`、`not.toContainText` 或类似负向 locator 断言,否则测试可能等到 terminal DOM 替换后误通过,掩盖 running 阶段污染。
|
||||
- 失败必须保留截图、Playwright trace 或等价 artifact;关键路径可生成命名截图。
|
||||
|
||||
Workbench 至少覆盖:
|
||||
|
||||
Reference in New Issue
Block a user