test(acceptance): align automatic preload workflows
This commit is contained in:
@@ -7,7 +7,7 @@ const source = readFileSync(new URL('./manual-state-loading-pda.mjs', import.met
|
||||
test('retains all clickable container, loading-list and PDA workflow states through public APIs', () => {
|
||||
for (const status of ['WAIT_LOADING', 'EDITING', 'LOADING', 'COMPLETED',
|
||||
'UNASSIGNED', 'IN_PROGRESS', 'AWAITING_REVIEW']) assert.match(source, new RegExp(`['"]${status}['"]`))
|
||||
for (const endpoint of ['/ocean-bookings', '/smart-loading', '/push-preload', '/inventory-snapshot',
|
||||
for (const endpoint of ['/ocean-bookings', '/smart-loading', '/plans/by-booking/', '/inventory-snapshot',
|
||||
'/batch', '/complete', '/loading-plans', '/loading-lists']) assert.match(source, new RegExp(endpoint))
|
||||
assert.match(source, /requiredStatuses/)
|
||||
assert.match(source, /detailPath/)
|
||||
@@ -18,7 +18,7 @@ test('retains all clickable container, loading-list and PDA workflow states thro
|
||||
assert.match(source, /\.\/inbound-measurement\.mjs/)
|
||||
assert.match(source, /context\.request\('POST', CONTAINERS/)
|
||||
assert.match(source, /summary\?\.processStatus === 'WAIT_SPLIT'/)
|
||||
const pushIndex = source.indexOf('`${SMART}/plans/${plan.id}/push-preload`')
|
||||
const pushIndex = source.indexOf('`${SMART}/plans/${plan.id}`')
|
||||
const transportIndex = source.indexOf('ocean-booking-link')
|
||||
assert.ok(transportIndex >= 0 && pushIndex > transportIndex)
|
||||
const unconfirmedTaskIndex = source.indexOf('`${PDA}/tasks?loadingPlanId=${planId}&warehouseId=${source.warehouseId}`', pushIndex)
|
||||
@@ -26,6 +26,7 @@ test('retains all clickable container, loading-list and PDA workflow states thro
|
||||
const canonicalTaskIndex = source.indexOf('`${PDA}/tasks?loadingPlanId=${planId}&warehouseId=${source.warehouseId}`', unconfirmedTaskIndex + 1)
|
||||
assert.ok(unconfirmedTaskIndex > pushIndex && confirmIndex > unconfirmedTaskIndex
|
||||
&& canonicalTaskIndex > confirmIndex)
|
||||
assert.doesNotMatch(source, /push-preload/)
|
||||
assert.match(source, /计划确认前不生成 PDA 任务/)
|
||||
assert.match(source, /summary\?\.readiness\?\.canConfirm === true/)
|
||||
assert.match(source, /Object\.freeze\(\{ expectedVersion: confirmableVersion \}\)/)
|
||||
|
||||
Reference in New Issue
Block a user