diff --git a/ruoyi-ui/src/views/ccdiProject/components/detail/RiskPeopleSection.vue b/ruoyi-ui/src/views/ccdiProject/components/detail/RiskPeopleSection.vue index 47d31bb6..6d960a6f 100644 --- a/ruoyi-ui/src/views/ccdiProject/components/detail/RiskPeopleSection.vue +++ b/ruoyi-ui/src/views/ccdiProject/components/detail/RiskPeopleSection.vue @@ -41,7 +41,7 @@ diff --git a/ruoyi-ui/tests/unit/preliminary-check-risk-people-binding.test.js b/ruoyi-ui/tests/unit/preliminary-check-risk-people-binding.test.js new file mode 100644 index 00000000..353c8ad6 --- /dev/null +++ b/ruoyi-ui/tests/unit/preliminary-check-risk-people-binding.test.js @@ -0,0 +1,20 @@ +const assert = require("assert"); +const fs = require("fs"); +const path = require("path"); + +const source = fs.readFileSync( + path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/RiskPeopleSection.vue"), + "utf8" +); + +[ + "sectionData.overviewList", + "sectionData.topRiskList", + "riskCount", + "riskPoint", + "modelCount", + "riskLevelType", +].forEach((token) => assert(source.includes(token), token)); + +assert(!source.includes("scope.row.riskLevelType || 'danger'"), "riskLevelType fallback"); +assert(source.includes('scope.row.actionLabel || "查看详情"'), "actionLabel fallback");