Files
SupplierSystem/server/tests/pickingCompleteKeepPlanQty.test.ts
Ubuntu 5fa2bbfd55
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
fix(audit-20261019): T1-T9 审计修复、存储归属与审计日志列宽
- T1 资金/库存/报价/自采 P1(BIZ-1/2/3/4/10/13/14)
- T2 主系统反向事件墓碑/改派/孤儿处理(BIZ-6/8/9)
- T3 选分公司 ticket、trust proxy、角色权限收口(SEC-2/3/4)
- T4 缺列/RLS/tenant 名单/FK/迁移执行器(DATA-1..8)
- T5 401 登出/分页/映射口径/blob/ZIP 中文名(FE-1..4/BIZ-15)
- T6 测试脚本目标守卫/config fail-fast/容器配置(OPS-2..8)
- T7 前后端测试与 lint 门禁清零
- T8 应付卡片按关联订单日(口径 A)
- T9 存储对象全链路归属校验、敏感列禁写、审计 target_id 超长修复
2026-10-19 16:16:51 +08:00

42 lines
1.8 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { readFileSync } from 'node:fs';
import path from 'path';
import { describe, expect, it } from 'vitest';
describe('分拣完成不改计划数量', () => {
it('confirmPickingComplete 不再调用 syncOrderItemFromPickingComplete', () => {
const src = readFileSync(path.join(__dirname, '../src/services/pickingService.ts'), 'utf8');
const confirmStart = src.indexOf('export async function confirmPickingComplete');
const confirmEnd = src.indexOf('export async function submitPickingAudit');
expect(confirmStart).toBeGreaterThan(0);
expect(confirmEnd).toBeGreaterThan(confirmStart);
const body = src.slice(confirmStart, confirmEnd);
expect(body).not.toContain('syncOrderItemFromPickingComplete');
expect(src).toContain('docs/design/20260829-picking-complete-keep-plan-qty.md');
});
it('deliveryLoadingService 核货阶段不回写订单结算量(结案 freeze 才写)', () => {
const src = readFileSync(
path.join(__dirname, '../src/services/deliveryLoadingService.ts'),
'utf8'
);
expect(src).not.toContain('syncOrderItemFromPickingComplete');
const fulfill = readFileSync(
path.join(__dirname, '../src/services/orderWorkflowFulfillmentService.ts'),
'utf8'
);
expect(fulfill).toContain('freezeOrderSettlementQtyOnComplete');
});
// 原「Go writeback 完成路径不回写订单量」断言已移除:`server-go/` 不在本仓库
// (T7 AC-T7.1.3)。Node 分拣/核货/结案路径由上面用例覆盖。
it('模块 04 口径一致', () => {
const mod = readFileSync(
path.join(__dirname, '../../docs/modules/04-分拣出库.md'),
'utf8'
);
expect(mod).toContain('不改**订单计划数量');
expect(mod).not.toContain('分拣完成(调单)');
});
});