test: expand inbound hold acceptance
This commit is contained in:
@@ -11,18 +11,39 @@ test('入库扣货真实 HTTP 模块进入默认全量并依赖订单造数', ()
|
||||
})
|
||||
|
||||
test('入库扣货模块覆盖隔离、幂等、冲突、候选门禁和统一订单投影', () => {
|
||||
assert.match(source, /context\.createdResources\.orders/)
|
||||
assert.match(source, /fixture\.orderNo/)
|
||||
assert.match(source, /初始入库单允许扣货/)
|
||||
assert.match(source, /错误客户不能读取扣货快照/)
|
||||
assert.match(source, /扣货请求同键同载荷重放/)
|
||||
assert.match(source, /扣货同键异载荷返回A0409/)
|
||||
assert.match(source, /扣货入库单从智能装柜候选排除/)
|
||||
assert.match(source, /解除后入库单恢复智能装柜候选/)
|
||||
assert.match(source, /统一订单列表同步展示扣货字段/)
|
||||
assert.match(source, /统一订单列表同步恢复扣货字段/)
|
||||
assert.match(source, /summary\?\.holdFlag/)
|
||||
assert.match(source, /summary\?\.currentHoldReason/)
|
||||
assert.doesNotMatch(source, /\.holdCargo\b|\.holdReason\b|\bholdCargo\s*:|\bholdReason\s*:/)
|
||||
})
|
||||
|
||||
test('入库扣货冲突和重放均回查版本及不可变历史零漂移', () => {
|
||||
assert.match(source, /historyFacts\(replayed\) === heldHistoryFacts/)
|
||||
assert.match(source, /扣货冲突后版本、原因和历史零漂移/)
|
||||
assert.match(source, /解除后既有扣货历史身份和内容保持不可变/)
|
||||
assert.match(source, /historyFactsFrom\(historyRows\(released\)\.slice\(1\)\) === heldHistoryFacts/)
|
||||
assert.match(source, /historyFacts\(releaseReplay\) === releasedHistoryFacts/)
|
||||
assert.match(source, /过期版本冲突后解除快照和不可变历史零漂移/)
|
||||
})
|
||||
|
||||
test('入库扣货写操作统一使用请求头 Idempotency-Key 和 expectedVersion', () => {
|
||||
assert.match(source, /context\.request\('POST', path, body, context\.token, \{ 'Idempotency-Key': key \}\)/)
|
||||
assert.match(source, /expectedVersion: initialVersion/)
|
||||
assert.match(source, /expectedVersion: heldVersion/)
|
||||
assert.match(source, /inbound-hold-stale/)
|
||||
})
|
||||
|
||||
test('入库扣货模块只消费本轮 marker 造数且不读取历史资源或环境凭据', () => {
|
||||
assert.match(source, /context\.marker/)
|
||||
assert.match(source, /inboundCode=\$\{encodeURIComponent\(inboundCode\)\}/)
|
||||
assert.doesNotMatch(source, /process\.env|ADMIN_TEST_|MERCHANT_TEST_|history fixture|historical/i)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user