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

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

assert(
  /<el-table-column\s+prop="accountNos"\s+label="主体账号"/.test(source),
  "上传数据文件列表应新增绑定 accountNos 的主体账号列"
);

assert(
  /scope\.row\.accountNos\s*\|\|\s*['"]-['"]/.test(source),
  "主体账号列为空时应展示 '-'"
);

console.log("upload-data-account-column test passed");
