补充结果总览前端展示回归保护

This commit is contained in:
wkc
2026-03-22 12:06:42 +08:00
parent 44c782c1e2
commit d619a7a34c
4 changed files with 29 additions and 0 deletions

View File

@@ -23,10 +23,26 @@ const people = fs.readFileSync(
),
"utf8"
);
const mockSource = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/preliminaryCheck.mock.js"
),
"utf8"
);
["风险仪表盘", "overview-stats"].forEach((token) => assert(stats.includes(token), token));
["总人数", "高风险", "中风险", "低风险", "无风险人员"].forEach((token) =>
assert(mockSource.includes(`label: "${token}"`), token)
);
["currentData.summary", "currentData.riskPeople"].forEach((token) =>
assert(entry.includes(token), token)
);
["风险人员总览", "风险等级", "命中模型数", "查看详情"].forEach((token) =>
assert(people.includes(token), token)
);
["姓名", "身份证号", "所属部门", "核心异常点", "riskPointTagList"].forEach((token) =>
assert(people.includes(token), token)
);
assert(!people.includes("中高风险人员TOP10"), "不应保留TOP10区块");
assert(entry.includes("risk-people-section"), "入口应挂载风险人员区");