61 lines
1.8 KiB
JavaScript
61 lines
1.8 KiB
JavaScript
const assert = require("assert");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const sidebar = fs.readFileSync(
|
|
path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiProject/components/detail/ProjectAnalysisSidebar.vue"
|
|
),
|
|
"utf8"
|
|
);
|
|
const dialog = fs.readFileSync(
|
|
path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiProject/components/detail/ProjectAnalysisDialog.vue"
|
|
),
|
|
"utf8"
|
|
);
|
|
const entry = fs.readFileSync(
|
|
path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiProject/components/detail/PreliminaryCheck.vue"
|
|
),
|
|
"utf8"
|
|
);
|
|
|
|
[
|
|
"人员基础信息",
|
|
"命中模型摘要",
|
|
"姓名",
|
|
"工号",
|
|
"部门",
|
|
"风险等级",
|
|
"所属项目",
|
|
"命中模型数",
|
|
"核心异常标签",
|
|
"暂无异常标签",
|
|
"formatRiskTag",
|
|
"tag.ruleName",
|
|
"justify-content: flex-start",
|
|
"width: 100%",
|
|
".sidebar-field--column .sidebar-field__label",
|
|
"margin-bottom: 8px",
|
|
].forEach((token) => assert(sidebar.includes(token), token));
|
|
|
|
assert(!sidebar.includes("当前命中模型"), "命中模型摘要应移除当前命中模型字段");
|
|
assert(!sidebar.includes("排查记录摘要"), "侧栏应移除排查记录摘要");
|
|
assert(!sidebar.includes("sidebar-summary"), "侧栏不应再渲染排查记录摘要文案");
|
|
assert(!sidebar.includes("position: sticky"), "左侧整卡不应保持固定");
|
|
assert(!sidebar.includes("border: 1px solid #e2e8f0"), "左右区域合并后左侧不应保留独立卡片边框");
|
|
|
|
assert(!sidebar.includes("关系人画像"), "侧栏不应扩展到额外区块");
|
|
assert(!sidebar.includes("资产分布"), "侧栏不应扩展到额外区块");
|
|
|
|
[
|
|
"this.detailData && this.detailData.basicInfo",
|
|
"...(this.modelSummary || {})",
|
|
].forEach((token) => assert(dialog.includes(token), token));
|
|
|
|
assert(entry.includes(':model-summary="projectAnalysisModelSummary"'), "入口页应继续透传模型摘要");
|