65 lines
1.5 KiB
JavaScript
65 lines
1.5 KiB
JavaScript
const assert = require("assert");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const dialog = fs.readFileSync(
|
|
path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiProject/components/detail/ProjectAnalysisDialog.vue"
|
|
),
|
|
"utf8"
|
|
);
|
|
const mockSource = fs.readFileSync(
|
|
path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiProject/components/detail/preliminaryCheck.mock.js"
|
|
),
|
|
"utf8"
|
|
);
|
|
|
|
[
|
|
'title="项目分析"',
|
|
"<project-analysis-sidebar",
|
|
"project-analysis-header",
|
|
"project-analysis-workspace",
|
|
'class="project-analysis-tabs"',
|
|
'<el-tabs v-model="activeTab"',
|
|
'name="abnormalDetail"',
|
|
'label="异常明细"',
|
|
'label="资产分析"',
|
|
'label="征信摘要"',
|
|
'label="关系图谱"',
|
|
'label="资金流向"',
|
|
"fetchDetailData()",
|
|
"detailLoading",
|
|
"detailError",
|
|
"handleRetryDetail()",
|
|
"border: 1px solid #e2e8f0",
|
|
"border-radius: 24px",
|
|
].forEach((token) => assert(dialog.includes(token), token));
|
|
|
|
[
|
|
'width="92%"',
|
|
'top="2vh"',
|
|
"project-analysis-header__main",
|
|
"project-analysis-header__meta",
|
|
].forEach((token) => assert(dialog.includes(token), token));
|
|
|
|
[
|
|
'width="80%"',
|
|
'top="5vh"',
|
|
"project-analysis-shell",
|
|
"project-analysis-layout__main-scroll",
|
|
"overflow-y: auto",
|
|
"max-height: calc(90vh - 120px)",
|
|
].forEach((token) => assert(!dialog.includes(token), token));
|
|
|
|
[
|
|
"projectAnalysisTabs",
|
|
'key: "abnormalDetail"',
|
|
'key: "assetAnalysis"',
|
|
'key: "creditSummary"',
|
|
'key: "relationshipGraph"',
|
|
'key: "fundFlow"',
|
|
].forEach((token) => assert(mockSource.includes(token), token));
|