Skip to content

Commit fa6eb7d

Browse files
committed
test(dashboard): follow answer formatter ownership in workspace contract
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
1 parent 7ada6f3 commit fa6eb7d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/presentation/dashboard/src/features/personal-workspace/personal-workspace-contract.test.mjs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
22
import { readFileSync } from "node:fs";
33

44
const source = (name) => readFileSync(new URL(name, import.meta.url), "utf8");
5+
const answerText = source("./answer-text.ts");
56
const model = source("./personal-workspace-model.ts");
67
const drawer = source("./context-drawer.tsx");
78
const header = source("./channel-header.tsx");
@@ -122,9 +123,9 @@ for (const legacyClassifier of ["hasHeartbeatIntent", "hasMonitorIntent", "hasTo
122123
}
123124
assert.match(dashboard, /Agent 已返回结果/, "A completed task Session advertises its result instead of looking stalled");
124125
assert.match(dashboard, /sessionStatus: hasResult \? "completed"/, "A returned answer outranks a stale transport label in the visible Session status");
125-
assert.match(dashboard, /function visibleAgentMessage[\s\S]*GOAL_\(STATUS\|PROGRESS\)/, "Internal Session protocol markers stay out of the user-facing result");
126-
assert.match(dashboard, /GOAL_EVIDENCE[\s\S]*验证依据:/, "Session evidence uses a readable heading instead of an internal protocol marker");
127-
assert.match(dashboard, /NEXT_ACTION[\s\S]*下一步:/, "Session next actions use a readable heading instead of an internal protocol marker");
126+
assert.match(answerText, /function visibleAgentMessage[\s\S]*GOAL_\(STATUS\|PROGRESS\)/, "Internal Session protocol markers stay out of the user-facing result");
127+
assert.match(answerText, /GOAL_EVIDENCE[\s\S]*验证依据:/, "Session evidence uses a readable heading instead of an internal protocol marker");
128+
assert.match(answerText, /NEXT_ACTION[\s\S]*下一步:/, "Session next actions use a readable heading instead of an internal protocol marker");
128129
assert.match(tasks, /t\("tasks\.viewResult"\)/, "Tasks expose a direct result entry when a Session has answered");
129130
assert.match(tasks, /t\("tasks\.pendingAndRunning"\)/, "Tasks do not imply that every uncompleted Todo already has an active Run");
130131
assert.match(tasks, /t\("tasks\.chatRecent"\)/, "Tasks surface the latest Goal conversation without forcing a tab switch");

0 commit comments

Comments
 (0)