\{activeError\}<\/p>/);
// And: only the two live-region phases ever produce spoken text.
const phases: readonly ChatReplyPhase[] = ["idle", "generating", "recovering", "completed", "stopped", "failed"];
const spoken = phases.filter((phase) => chatReplyAnnouncement(phase, 1) !== "");
assert.deepEqual(spoken, ["generating", "completed"]);
});
test("the recovered background reply tells the reader where it landed", () => {
assert.equal(pageSource.match(/回答已恢复,已显示在对话区末尾。/g)?.length, 2);
assert.doesNotMatch(pageSource, /setComposerNotice\("回答已恢复。"\)/);
});
test("assertive announcement is reserved for genuine errors", () => {
// Given: the bootstrap failure screen is the only assertive surface on the page.
assert.match(pageSource, /