提交
This commit is contained in:
1 parent
0e1b750457
commit
8c49021d38
93 files changed
+22731
-12107
No files matched your search
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* 打印「审批流程」:撤销清待办 cancelled → 无需处理;终态归因发起人
|
||||
* Spec: docs/superpowers/specs/2026-08-13-oa-progress-withdraw-cancelled-display-design.md
|
||||
*/
|
||||
import { describe, it } from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { buildFlowItems } from './oa-approval-print-flow'
|
||||
|
||||
describe('buildFlowItems · withdraw cancelled', () => {
|
||||
it('maps cancelled approval task to 无需处理 and terminal to 发起人撤销', () => {
|
||||
const items = buildFlowItems({
|
||||
progress: [
|
||||
{
|
||||
kind: 'submit',
|
||||
title: '发起人',
|
||||
status: 'submitted',
|
||||
assigneeUserName: '吴子龙',
|
||||
timestamp: '2026-08-13 11:17:38'
|
||||
},
|
||||
{
|
||||
kind: 'task',
|
||||
title: '直接主管',
|
||||
status: 'cancelled',
|
||||
signMode: 'and',
|
||||
timestamp: '',
|
||||
people: [
|
||||
{
|
||||
nickName: '张主管',
|
||||
status: 'cancelled',
|
||||
timestamp: '2026-08-13 12:47:46',
|
||||
commentText: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
kind: 'terminal',
|
||||
title: '已撤销',
|
||||
status: 'cancelled',
|
||||
assigneeUserName: '吴子龙',
|
||||
commentText: '发起人撤销',
|
||||
timestamp: '2026-08-13 12:47:46'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
assert.equal(items[0].left.includes('已提交'), true)
|
||||
assert.equal(items[1].left, '【直接主管·会签】 无需处理')
|
||||
assert.deepEqual(items[1].personLines, [{ left: '张主管 无需处理', right: '' }])
|
||||
assert.equal(items[2].left, '已撤销 吴子龙 发起人撤销')
|
||||
assert.equal(items[2].right, '2026-08-13 12:47:46')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user