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

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

assert(source.includes("申请人姓名"), "采购 Tab 应显示申请人姓名查询项");
assert(source.includes("申请日期范围"), "采购 Tab 应显示申请日期范围查询项");
assert(source.includes("面试官姓名"), "招聘 Tab 应显示面试官姓名查询项");
assert(source.includes("员工姓名"), "调动 Tab 应显示员工姓名查询项");
assert(source.includes("调动日期范围"), "调动 Tab 应显示调动日期范围查询项");
assert(source.includes("applicantName"), "采购查询字段应使用 applicantName");
assert(source.includes("interviewerName"), "招聘查询字段应使用 interviewerName");
assert(source.includes("staffName"), "调动查询字段应使用 staffName");
assert(source.includes("applyDateStart"), "采购日期范围应拆分开始字段");
assert(source.includes("applyDateEnd"), "采购日期范围应拆分结束字段");
assert(source.includes("transferDateStart"), "调动日期范围应拆分开始字段");
assert(source.includes("transferDateEnd"), "调动日期范围应拆分结束字段");
