接入结果总览模型卡片真实数据

This commit is contained in:
wkc
2026-03-20 11:24:32 +08:00
parent 6cdc1b4019
commit 37e6eef26c
3 changed files with 64 additions and 17 deletions

View File

@@ -0,0 +1,34 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const preliminaryCheckSource = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/PreliminaryCheck.vue"
),
"utf8"
);
const mockSource = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/preliminaryCheck.mock.js"
),
"utf8"
);
[
"getOverviewRiskModelCards",
"riskModelCardsRes",
"riskModelCardsData",
"Promise.all",
"pageState === 'loading'",
"pageState === 'empty'",
'hasOverviewData ? "loaded" : "empty"',
].forEach((token) => assert(preliminaryCheckSource.includes(token), token));
[
"warningTypeOptions",
'model: "large"',
].forEach((token) => assert(!mockSource.includes(token), token));