This commit is contained in:
2026-08-26 17:27:09 +08:00
parent ef45325643
commit 05e3aa4e8d
7 changed files with 143 additions and 121 deletions
@@ -22,7 +22,7 @@ test('PDA module is injected, token-scoped, traceable, and contains no direct ne
test('PDA module covers the container-number receiving contract and excludes outbound domains', () => {
for (const token of ['/candidates', '/prepare', '/current/unload-photos/files', '/current/sign',
'/current/skus/resolve', '/current/cartons/resolve', '/current/pallets/resolve',
'/current/cartons/resolve', '/current/pallets/resolve',
'/current/receipts/bulk', '/current/receipts/carton', '/current/complete']) assert.ok(source.includes(token), token)
for (const token of ['/inventory/resolve', '/locations/resolve', '/pallets/resolve', '/operations?page=1&size=50']) {
assert.ok(source.includes(token), token)
@@ -41,8 +41,8 @@ test('PDA module covers the container-number receiving contract and excludes out
assert.match(source, /超收被拒绝/)
assert.match(source, /重复箱新键被拒绝/)
assert.match(source, /key\(context, `fba-bulk-\$\{index\}`\)/)
assert.match(source, /packageCount = Number\(resolved\.data\?\.pendingPackages \|\| 0\)/)
assert.match(source, /if \(packageCount <= 0\) continue/)
assert.match(source, /packageCount = Number\(inbound\.pendingPackages \|\| 0\)/)
assert.match(source, /if \(packageCount <= 0\) return true/)
assert.match(source, /key\(context, `overseas-carton-\$\{index\}`\)/)
assert.match(source, /模式硬拒绝/)
assert.match(source, /current返回404正常空态/)
@@ -57,11 +57,14 @@ test('PDA module covers the container-number receiving contract and excludes out
assert.match(source, /retained as acceptance evidence/)
assert.match(source, /preferredProducer\?\.cartonMarks\?\.length/)
assert.match(source, /const cartonCandidates =/)
assert.match(source, /candidateExcluded = notFound\(response\)/)
assert.match(source, /if \(candidateExcluded\) continue/)
assert.match(source, /const fixturesConserved = cartonFixtures\.length === expectedPending/)
assert.doesNotMatch(source, /current\/skus\/resolve/)
assert.doesNotMatch(source, /skuCode:/)
assert.match(source, /FBA和OVERSEAS箱码resolve都必须HTTP 200\/code 200并返回当前柜唯一入仓码/)
assert.match(source, /const matches = inbounds\.filter/)
assert.match(source, /matches\.length === 1/)
assert.match(source, /const fixturesConserved = overseasFixtures\.length === expectedPending/)
assert.match(source, /OVERSEAS实装箱唛与待收箱数守恒/)
assert.match(source, /for \(const \[index, fixture\] of cartonFixtures\.entries\(\)\)/)
assert.match(source, /for \(const \[index, fixture\] of overseasFixtures\.entries\(\)\)/)
assert.doesNotMatch(source, /for \(const \[index, cartonMark\] of cartonMarks\.entries\(\)\)/)
assert.match(source, /last-leg\/orders\?page=1&size=200&containerNo=/)
assert.match(source, /phase4OverseasPda\.orderId = id\(order\.id\)/)
@@ -70,7 +73,9 @@ test('PDA module covers the container-number receiving contract and excludes out
assert.match(source, /作业历史包含本轮柜号收货动作且分页稳定/)
assert.match(source, /awaitProducerConsumption\(context, allProducers\)/)
assert.match(source, /last-leg\/orders\?page=1&size=200&containerNo=/)
assert.match(source, /跨区消费生成尾程订单/)
assert.match(source, /跨区广播消费观察/)
assert.match(source, /OBSERVATION_OPTIONS = \{ scenario: SCENARIO, deploymentBlocker: false \}/)
assert.doesNotMatch(source, /blockerGap\(context, '跨区消费生产矩阵'/)
assert.match(source, /awaitPickupReadyCandidates\(context, primary\.token, producers, allProducers\)/)
assert.match(source, /missingPickupReady=/)
assert.match(source, /item\?\.shippingReady === false/)
@@ -82,6 +87,25 @@ test('PDA module covers the container-number receiving contract and excludes out
assert.doesNotMatch(source, /awaitProducerCandidates/)
})
test('real-device legacy FBA carton rejection is retained as regression evidence', () => {
const evidence = {
http: 200,
code: 'A0409',
message: 'FBA destination must use bulk count',
requestId: '5e925a3d-8184-41e1-b0d2-f4e1aae86639',
traceId: '62fdf603b65fd7f43ec452bb8a6ca185',
}
assert.deepEqual(evidence, {
http: 200,
code: 'A0409',
message: 'FBA destination must use bulk count',
requestId: '5e925a3d-8184-41e1-b0d2-f4e1aae86639',
traceId: '62fdf603b65fd7f43ec452bb8a6ca185',
})
assert.match(source, /a0409Message\(response, \/\^FBA destination must use bulk count\$\//)
assert.match(source, /a0409Message\(response, \/\^OVERSEAS destination must use carton-by-carton scanning; bulk count is forbidden\$\//)
})
test('PDA receiving lifecycle is ordered from candidate claim through photos, mode-specific receipts, pallet and complete', () => {
const orderedTokens = [
"'查询当前客户待收柜号'", "'选择柜号并建立WAIT_SIGN会话'",