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

const pagePath = path.resolve(
  __dirname,
  "../../src/views/ccdiIntermediary/index.vue"
);
const source = fs.readFileSync(pagePath, "utf8");

[
  "导入中介和亲属信息",
  "导入中介实体关联关系",
  "查看中介和亲属信息导入失败记录",
  "查看中介实体关联关系导入失败记录",
  "personImportTask",
  "enterpriseRelationImportTask"
].forEach((token) => {
  assert(source.includes(token), `中介导入页面缺少按钮或任务状态: ${token}`);
});

console.log("intermediary-import-toolbar test passed");
