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

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

[
  "未提交账户",
  "被调查主体未提交分析的同名账户",
  "涉及主体数",
  "未提交账户数",
  "流入总额",
  "流出总额",
  "流入/流出差额",
  "交易占比较高",
  "导出流水",
  "handleUnsubmittedAccountCardClick",
  "getOverviewUnsubmittedAccountFlows",
  "unsubmittedFlowVisible",
  "unsubmittedSubjectTotal",
  "流水明细",
  "本方账户/主体",
  "对方名称/账户",
  "摘要/交易类型",
  "handleSuspiciousTransactionExport",
  "ccdi/project/overview/suspicious-transactions/export",
  "涉疑交易明细_",
  "当前项目暂无未提交账户",
  "异常账户人员信息",
  "账号",
  "开户人",
  "银行",
  "异常类型",
  "异常发生时间",
  "状态",
  "命中原因",
  "涉及金额",
  "当前项目暂无异常账户人员信息",
].forEach((token) => assert(source.includes(token), token));

assert(
  !source.includes("ccdi/project/overview/risk-details/export"),
  "风险明细区块不应再调用综合风险明细导出"
);

assert(
  !source.includes("已排除银行贷款类账号"),
  "未提交账户说明不应展示贷款排除文案"
);
