test: 同步报销审批流与预算分析测试

- 新增预算审批合并、风险标记去重与占位条目校验用例
- 补充预算分析对当前审核人与财务的可见性断言
- 调整单据删除权限测试以匹配 admin 限制
This commit is contained in:
caoxiaozhu
2026-06-17 14:39:26 +08:00
parent 0fac8b615f
commit 4199feb681
10 changed files with 907 additions and 42 deletions

View File

@@ -68,6 +68,18 @@ test('budget ontology context maps dialog fields to ontology payload', () => {
assert.equal(context.budget_details[0].warning_threshold, '80%')
})
test('budget ontology includes approval review execution metrics', () => {
const fieldKeys = BUDGET_ONTOLOGY_FIELDS.map((field) => field.key)
assert.ok(fieldKeys.includes('claim_amount'))
assert.ok(fieldKeys.includes('claim_amount_ratio'))
assert.ok(fieldKeys.includes('usage_rate'))
assert.ok(fieldKeys.includes('after_usage_rate'))
assert.ok(fieldKeys.includes('remaining_budget_ratio'))
assert.ok(fieldKeys.includes('available_before_amount'))
assert.ok(fieldKeys.includes('over_budget_amount'))
})
test('budget expense type options expose real expense type codes', () => {
const optionCodes = BUDGET_EXPENSE_TYPE_OPTIONS.map((item) => item.value)