feat: 扩展风险规则体系、审批动态路由与预算中心列表化改造
- 新增 25+ 条风险规则(预算/报销/申请/通用类),完善风险规则模拟与反馈发布机制 - 引入费用审批动态路由、平台风险分级、预审与风险阶段管理 - 预算中心列表化改造,优化票据夹仪表盘与数字员工工作看板 - 新增 Hermes 风险线索收集器、Agent 链路追踪中心 - 扩展数字员工能力库(18 个领域 Skill)与交通费用自动预估 - 完善报销申请快速预览、权限控制与前端测试覆盖
This commit is contained in:
@@ -406,20 +406,22 @@ test('review drawer save action is disabled while receipt recognition is submitt
|
||||
)
|
||||
})
|
||||
|
||||
test('draft creation starts composer attachment persistence after response rendering', () => {
|
||||
test('draft creation keeps detail-scoped attachment persistence alive before close', () => {
|
||||
assert.match(
|
||||
submitComposerScript,
|
||||
/void syncComposerFilesToDraft\(resolvedDraftClaimId, files\)\s*\.then\(\(syncResult\) => \{[\s\S]*persistSessionState\(\)[\s\S]*emitRequestUpdated\?\.\(\{/s
|
||||
/const persistComposerFilesToDraft = async \(\) => \{[\s\S]*const syncResult = await syncComposerFilesToDraft\(resolvedDraftClaimId, files\)[\s\S]*persistSessionState\(\)[\s\S]*if \(detailScopedUpload\) \{[\s\S]*emitRequestUpdated\?\.\(\{/s
|
||||
)
|
||||
assert.doesNotMatch(
|
||||
assert.match(
|
||||
submitComposerScript,
|
||||
/await syncComposerFilesToDraft\(resolvedDraftClaimId, files\)/
|
||||
/const persistTask = persistComposerFilesToDraft\(\)[\s\S]*if \(detailScopedUpload\) \{[\s\S]*await persistTask[\s\S]*\} else \{[\s\S]*void persistTask[\s\S]*\}/s
|
||||
)
|
||||
assert.ok(
|
||||
submitComposerScript.indexOf('replaceMessage(pendingMessage.id, assistantMessage)') <
|
||||
submitComposerScript.indexOf('void syncComposerFilesToDraft(resolvedDraftClaimId, files)'),
|
||||
submitComposerScript.indexOf('const persistTask = persistComposerFilesToDraft()'),
|
||||
'assistant response should render before background attachment persistence starts'
|
||||
)
|
||||
assert.match(submitComposerScript, /source: 'detail-smart-entry-attachment-sync'/)
|
||||
assert.match(submitComposerScript, /uploadedCount: Number\(syncResult\?\.uploadedCount \|\| 0\)/)
|
||||
assert.match(attachmentsScript, /function normalizeAttachmentMatchName\(value\)/)
|
||||
assert.match(attachmentsScript, /const normalizedMatchBuckets = new Map\(\)/)
|
||||
assert.match(
|
||||
|
||||
Reference in New Issue
Block a user