优化
This commit is contained in:
@@ -68,7 +68,7 @@ test('records LOADED and clears the reason only after a real LOADED reread', ()
|
||||
|
||||
test('container loading follows push, claim, real pick, completed sequence', () => {
|
||||
const value = source('./phase3-container-loading.mjs')
|
||||
assert.match(value, /containerDetail\?\.planStatus === 'WAIT_LOADING'/)
|
||||
assert.match(value, /\['EDITING', 'WAIT_LOADING'\]\.includes\(containerDetail\?\.planStatus\)/)
|
||||
assertOrder(value, [
|
||||
"pushed?.status === 'EDITING'",
|
||||
"claimedPlan?.status === 'LOADING'",
|
||||
@@ -124,6 +124,23 @@ test('PDA inventory snapshot gates batch and records the only safe mutation gap'
|
||||
assert.match(convergence, /fixture\?\.inventoryMutationVerified !== true/)
|
||||
})
|
||||
|
||||
test('container loading creates and confirms booking before scoped candidates', () => {
|
||||
const value = source('./phase3-container-loading.mjs')
|
||||
assertOrder(value, [
|
||||
"const bookingCreate = await request",
|
||||
"const submit = await request",
|
||||
"const confirm = await request",
|
||||
"const candidateResponse = await context.request('GET', `${SMART}/candidates?bookingId=",
|
||||
"const planResponse = await request(context, 'POST', `${SMART}/plans`",
|
||||
"const assignResponse = await request",
|
||||
])
|
||||
assert.match(value, /channelCode: channelCode/)
|
||||
assert.match(value, /warehouseId, warehouseName/)
|
||||
assert.match(value, /containerAllocations\?\.\[0\]/)
|
||||
assert.match(value, /bookingId=\$\{encodeURIComponent\(containerId\)\}&warehouseId=/)
|
||||
assert.doesNotMatch(value, /POST', CONTAINERS, containerPayload/)
|
||||
})
|
||||
|
||||
test('PDA completion acceptance verifies immutable BATCH and COMPLETE_LOADING audit with operator metadata', () => {
|
||||
const container = source('./phase3-container-loading.mjs')
|
||||
const convergence = source('./phase3-pda-convergence.mjs')
|
||||
|
||||
Reference in New Issue
Block a user