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" ); const placeholderTab = fs.readFileSync( path.resolve( __dirname, "../../src/views/ccdiProject/components/detail/ProjectAnalysisPlaceholderTab.vue" ), "utf8" ); [ 'title="项目分析"', 'width="80%"', 'top="5vh"', "project-analysis-header", "project-analysis-overview", "analysis-panel", "project-analysis-header__title", "project-analysis-header__risk", "project-analysis-header__meta", " assert(dialog.includes(token), token)); assert(!dialog.includes("project-analysis-shell"), "不应继续保留内部大白卡外壳"); assert(!dialog.includes('class="source-summary"'), "当前命中模型不应停留在主区顶部"); assert(placeholderTab.includes("analysis-panel--placeholder"), "占位页签应与主区面板统一样式基线"); assert( !placeholderTab.includes("background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)"), "占位页签不应继续保留旧渐变底" ); [ "projectAnalysisTabs", 'key: "abnormalDetail"', 'key: "assetAnalysis"', 'key: "creditSummary"', 'key: "relationshipGraph"', 'key: "fundFlow"', ].forEach((token) => assert(mockSource.includes(token), token));