refactor: enforce 800 line source limits
This commit is contained in:
@@ -146,3 +146,26 @@ test('AI conversation renderer keeps separated step bullets in one numbered sequ
|
||||
assert.match(rendered, /<span class="ai-html-step-index">2<\/span>[\s\S]*预算与审批预审/)
|
||||
assert.match(rendered, /<span class="ai-html-step-index">3<\/span>[\s\S]*申请表生成/)
|
||||
})
|
||||
|
||||
test('AI conversation renderer hides noisy attachment association reason fragments', () => {
|
||||
const rendered = renderAiConversationHtml([
|
||||
'### 我已先识别票据,并匹配到最可能的报销单',
|
||||
'',
|
||||
'本次附件:1 份(2月20 武汉-上海.pdf)',
|
||||
'',
|
||||
'识别摘要:2月20 武汉-上海.pdf:电子发票(铁路电子客票) 武汉-上海 票价 354元',
|
||||
'',
|
||||
'推荐关联:R74CB7C2R',
|
||||
'',
|
||||
'单据事项::26429165800002785705; :2026; 05',
|
||||
'',
|
||||
'匹配依据:票据日期与报销单日期一致;地点或行程包含 上海;当前单据仍是可归集草稿'
|
||||
].join('\n'))
|
||||
|
||||
assert.match(rendered, /ai-attachment-association-card/)
|
||||
assert.match(rendered, /R74CB7C2R/)
|
||||
assert.doesNotMatch(rendered, /单据事项/)
|
||||
assert.doesNotMatch(rendered, /关联事项/)
|
||||
assert.doesNotMatch(rendered, /26429165800002785705/)
|
||||
assert.doesNotMatch(rendered, /:2026/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user