const assert = require("assert");
const fs = require("fs");
const path = require("path");

const specialCheckSource = fs.readFileSync(
  path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/SpecialCheck.vue"),
  "utf8"
);
const sectionSource = fs.readFileSync(
  path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/FamilyAssetLiabilitySection.vue"),
  "utf8"
);
const detailSource = fs.readFileSync(
  path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/FamilyAssetLiabilityDetail.vue"),
  "utf8"
);

assert(!specialCheckSource.includes("功能开发中"), "不应再出现占位文案");
assert(sectionSource.includes("section-card"), "列表区块应沿用白卡容器结构");
assert(sectionSource.includes("block-header"), "列表区块应沿用标题头结构");
assert(sectionSource.includes("block-title"), "列表区块缺少标题样式");
assert(sectionSource.includes("block-subtitle"), "列表区块缺少副标题样式");
assert(sectionSource.includes(":deep(.family-table th)"), "表格头样式应与结果总览统一");
assert(sectionSource.includes("el-tag"), "风险标签应保留标签形态");
assert(detailSource.includes("block-title"), "详情区块标题应与结果总览标题层级统一");
assert(detailSource.includes("section-summary-value"), "详情区标题应展示汇总值");
assert(detailSource.includes("detail-stack"), "详情区应改为纵向汇总卡片");
assert(detailSource.includes("summary-group-list"), "资产与负债应改为来源项摘要列表");
assert(detailSource.includes("metric-grid"), "关键指标区应保留紧凑指标排布");
