test: guard workbench action coverage
Some checks failed
StoryForge CI / Baseline checks (push) Has been cancelled
StoryForge CI / Backend tests (push) Has been cancelled
StoryForge CI / Web tests (push) Has been cancelled

This commit is contained in:
kris
2026-03-31 01:07:17 +08:00
parent 3f3c8de949
commit 7a928b5df9
2 changed files with 10 additions and 1 deletions

View File

@@ -33,6 +33,7 @@
- `找对标 / 跟踪账号` 里一批已经失效的 “当前平台待接入” 按钮禁用与入口分支已删除,当前 active 平台都直接走真实路由,失败时再给真实反馈。
- 工作台前端已经清掉浏览器 `alert` 弹窗,缺对象、权限不足、刷新失败和加载失败都会回到站内反馈,不再把用户从当前流程里打断出去。
- `OneLiner 会话 / 主 Agent 运行 / 动作执行器 / 跟踪同步 / 高分分析 / 平台技能验收` 这批真接口也已经去掉“当前实例未提供”的旧降级口径,统一按 live 结果说话。
- 新增一条前端回归护栏:静态声明出来的 `data-action` 必须有明确处理逻辑,避免后续再出现“点了没反应,最后落到动作待接入”的隐性缺口。
### NAS 联调与回归
@@ -40,7 +41,7 @@
- Web: `http://192.168.31.188:19192/`
- Collector: `http://192.168.31.188:19193/healthz`
- 当前基线通过:
- 前端测试 `62/62`
- 前端测试 `63/63`
- `bash scripts/check_repo_baseline.sh`
- `bash scripts/smoke_fnos_storyforge_lan.sh`

View File

@@ -797,3 +797,11 @@ test("live-first workbench flows no longer advertise stale missing-capability pl
assert.doesNotMatch(APP, /当前实例还没有开放平台技能验收接口/);
assert.doesNotMatch(APP, /当前实例未提供/);
});
test("declared static workbench actions are wired into explicit handlers", () => {
const declared = new Set([...APP.matchAll(/data-action="([a-zA-Z0-9_-]+)"/g)].map((match) => match[1]));
const clickHandled = new Set([...APP.matchAll(/if \(name === "([a-zA-Z0-9_-]+)"\)/g)].map((match) => match[1]));
const knownNonClick = new Set(["submit-auth", "submit-oneliner", "submit-sheet", "close-sheet", "close-auth", "close-oneliner", "discovery-query", "refresh-data"]);
const missing = [...declared].filter((name) => !clickHandled.has(name) && !knownNonClick.has(name)).sort();
assert.deepEqual(missing, []);
});