feat: 新增风险图谱算法与系统仪表盘及操作反馈体系
后端新增风险图谱算法模块、风险观察与反馈服务、规则 DSL 校验器和可解释性引擎,完善系统仪表盘和财务仪表盘统计, 优化 agent 运行和编排执行链路,清理旧开发文档,前端新增 系统趋势、负载热力图等多种仪表盘图表组件,完善操作反馈 对话框和工作台日期选择器,优化报销创建和审批详情交互, 补充单元测试覆盖。
This commit is contained in:
42
web/tests/risk-observation-evidence-card.test.mjs
Normal file
42
web/tests/risk-observation-evidence-card.test.mjs
Normal file
@@ -0,0 +1,42 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const component = readFileSync(
|
||||
fileURLToPath(new URL('../src/components/travel/RiskObservationEvidenceCard.vue', import.meta.url)),
|
||||
'utf8'
|
||||
)
|
||||
const styles = readFileSync(
|
||||
fileURLToPath(
|
||||
new URL('../src/assets/styles/components/risk-observation-evidence-card.css', import.meta.url)
|
||||
),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
test('risk observation evidence card supports switching active observation details', () => {
|
||||
assert.match(component, /当前风险观察详情/)
|
||||
assert.match(component, /const detailRegionId = 'risk-observation-active-detail'/)
|
||||
assert.match(component, /:aria-controls="detailRegionId"/)
|
||||
assert.match(component, /:aria-pressed="isActiveObservation\(item, index\)"/)
|
||||
assert.match(component, /@click="selectObservation\(item, index\)"/)
|
||||
assert.match(component, /const feedbackRows = computed/)
|
||||
assert.match(component, /反馈历史/)
|
||||
assert.match(styles, /\.risk-evidence-current-head/)
|
||||
assert.match(styles, /\.risk-observation-row:focus-visible/)
|
||||
})
|
||||
|
||||
test('risk observation evidence card remains scoped to current claim data', () => {
|
||||
assert.match(component, /fetchClaimRiskObservations\(claimId\)/)
|
||||
assert.doesNotMatch(component, /fetchEmployeeProfile/)
|
||||
assert.doesNotMatch(component, /employeeBehaviorProfile/)
|
||||
assert.doesNotMatch(component, /KnowledgeIngestGraphView/)
|
||||
assert.doesNotMatch(component, /LightRAG/)
|
||||
})
|
||||
|
||||
test('risk observation evidence card keeps empty observation state out of main flow', () => {
|
||||
assert.match(component, /const visible = computed/)
|
||||
assert.match(component, /observations\.value\.length > 0/)
|
||||
assert.match(component, /暂无证据明细。/)
|
||||
assert.match(component, /暂无人工反馈。/)
|
||||
})
|
||||
Reference in New Issue
Block a user