33 lines
912 B
JavaScript
33 lines
912 B
JavaScript
|
|
const assert = require("assert");
|
||
|
|
const fs = require("fs");
|
||
|
|
const path = require("path");
|
||
|
|
|
||
|
|
const entrySource = fs.readFileSync(
|
||
|
|
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/PreliminaryCheck.vue"),
|
||
|
|
"utf8"
|
||
|
|
);
|
||
|
|
const sectionSource = fs.readFileSync(
|
||
|
|
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/RiskPeopleSection.vue"),
|
||
|
|
"utf8"
|
||
|
|
);
|
||
|
|
|
||
|
|
[
|
||
|
|
':project-id="projectId"',
|
||
|
|
':section-data="currentData.riskPeople"',
|
||
|
|
].forEach((token) => assert(entrySource.includes(token), token));
|
||
|
|
|
||
|
|
[
|
||
|
|
"sectionData.rows",
|
||
|
|
"pageNum",
|
||
|
|
"pageSize",
|
||
|
|
"total",
|
||
|
|
"<pagination",
|
||
|
|
':page-sizes="[5]"',
|
||
|
|
"handlePageChange",
|
||
|
|
"loadRiskPeoplePage",
|
||
|
|
"getOverviewRiskPeople",
|
||
|
|
"tableLoading",
|
||
|
|
].forEach((token) => assert(sectionSource.includes(token), token));
|
||
|
|
|
||
|
|
assert(!sectionSource.includes("if (page === this.pageNum)"), "分页切换不应被同步后的 pageNum 提前拦截");
|