Files
zkxw/web-admin/src/utils/oa-approval-print-flow.test.ts
T
zlwu b220298f89 chore: 清理历史资料并规范工程目录与开发规则
为减少仓库噪声和重复规则,整理当前开发入口并移除已废弃资料。

- 精简根 AGENTS,补充四个应用规则与 README,统一规范入口
- 归整部署文件、SOP 原稿和参考资源,修正迁移后的脚本路径
- 取消虚拟环境、工具状态、业务导出及备份的跟踪,本机所需原件保留
- 移除停用的 graphify 配置、脚本与产物
- 删除历史业务文档、执行计划、OpenSpec 业务变更和移动 UI 原型
- 清理失效引用,历史细胞产品导入改为必须显式指定 --file

验证:git diff --cached --check、OpenSpec 严格校验、导入参数隔离检查 3/3 通过;
迁移文件完整性和现行链接已核对。未执行部署、业务数据导入或服务启停。
2026-10-29 23:08:29 +08:00

52 lines
1.6 KiB
TypeScript

/**
* 打印「审批流程」:撤销清待办 cancelled → 无需处理;终态归因发起人
*/
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')
})
})