diff --git a/docs/development/testing-and-quality.md b/docs/development/testing-and-quality.md index cd7adfc50c..8b75a37065 100644 --- a/docs/development/testing-and-quality.md +++ b/docs/development/testing-and-quality.md @@ -123,6 +123,12 @@ coverage. 新的前端豁免由目标分支已审阅的策略控制;CI 自身 PRs opened before activation may need a branch update to produce the new required check; an old green suite alone does not supply a missing aggregate. +Browser waits must target the intended surface: a visible pending-message label +and an accessibility live region may contain the same words. Use a scoped or +exact locator and retain the bounded completion assertion; do not suppress a +strict-mode ambiguity with a retry or a longer timeout. 浏览器等待应区分消息提示与 +无障碍播报,不能把定位歧义误报成恢复超时,也不能通过删掉播报来让测试通过。 + ### Refactor Real-Path Gate / 重构真实路径门 The PR review capability's `observable_semantics` evidence gate applies to diff --git a/examples/personal-workspace-browser-smoke.mjs b/examples/personal-workspace-browser-smoke.mjs index 4490c0de68..e57a461aef 100644 --- a/examples/personal-workspace-browser-smoke.mjs +++ b/examples/personal-workspace-browser-smoke.mjs @@ -2918,7 +2918,9 @@ async function main() { await page.locator(".personal-goal-link").first().click(); await goalNavigation.getByRole("button", { name: "Chat" }).click(); await page.getByText("保持运行,用于验证刷新恢复。").waitFor({ state: "visible", timeout: 10_000 }); - await page.getByText("正在整理…").waitFor({ state: "hidden", timeout: 10_000 }); + // The live region also contains ": 正在整理…" while a reply is + // pending. Target the visible message placeholder, not both surfaces. + await page.getByText("正在整理…", { exact: true }).waitFor({ state: "hidden", timeout: 10_000 }); const recovered = page.__loopxRuntime.sessions.get(recoveryTurn.sessionId); if (recovered?.active_turn_id !== null && recovered?.active_turn_id !== recoveryTurn.turnId) { throw new Error("Recovered Session points at a different active Turn");