fix(notifications): refine bell notification center
This commit is contained in:
@@ -85,6 +85,24 @@ test('document center sidebar inbox shares source scoped document keys', () => {
|
||||
assert.deepEqual(rows.map((row) => resolveDocumentNewKey(row)), ['approval:claim-1', 'archive:claim-2'])
|
||||
})
|
||||
|
||||
test('document center inbox rows expose real notification metadata', () => {
|
||||
const rows = buildDocumentInboxRows({
|
||||
ownedClaims: [{
|
||||
id: 'claim-1',
|
||||
claim_no: 'EXP-1',
|
||||
title: '差旅报销',
|
||||
status: 'draft',
|
||||
created_at: '2026-06-03T09:10:00+08:00'
|
||||
}]
|
||||
})
|
||||
|
||||
assert.equal(rows[0].documentNo, 'EXP-1')
|
||||
assert.equal(rows[0].sourceLabel, '我的单据')
|
||||
assert.equal(rows[0].title, '差旅报销')
|
||||
assert.equal(rows[0].createdAt, '2026-06-03T09:10:00+08:00')
|
||||
assert.equal(Number.isFinite(rows[0].sortTime), true)
|
||||
})
|
||||
|
||||
test('document center scope state restores only allowed tabs', () => {
|
||||
const storage = createMemoryStorage()
|
||||
const scopes = ['全部', '申请单', '报销单', '审核单', '归档']
|
||||
|
||||
Reference in New Issue
Block a user