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

const source = fs.readFileSync(
  path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/RiskPeopleSection.vue"),
  "utf8"
);

[
  "risk-point-tag-list",
  "scope.row.riskPointTagList",
  "normalizeRiskPointTags",
  "tag.modelCode",
  "CORE_TAG_PALETTE",
  "backgroundColor",
  "borderColor",
  "LARGE_TRANSACTION",
  "ABNORMAL_TRANSACTION",
  "SUSPICIOUS_GAMBLING",
  "SUSPICIOUS_RELATION",
  "SUSPICIOUS_PART_TIME",
  "SUSPICIOUS_PROPERTY",
  "SUSPICIOUS_FOREIGN_EXCHANGE",
  "SUSPICIOUS_INTEREST_PAYMENT",
  "SUSPICIOUS_PURCHASE",
  "ABNORMAL_BEHAVIOR",
  ":style=\"resolveModelTagStyle(tag)\"",
].forEach((token) => assert(source.includes(token), token));

assert(!source.includes("selectedModelCodes"), "核心异常点颜色不应再依赖已选模型");
assert(!source.includes(":class=\"resolveModelTagClass(tag)\""), "不应继续依赖 class 覆盖颜色");
assert(!source.includes('<el-table-column prop="riskPoint" label="核心异常点" min-width="220" />'));
