This commit is contained in:
2026-09-15 20:51:06 +08:00
parent 9307a861cf
commit d46a0ee6d2
5 changed files with 51 additions and 19 deletions
+4 -2
View File
@@ -19,7 +19,7 @@ test('dropship palletization adapter uses only the dedicated production PDA cont
const api = await read('../api/pda-dropship.js')
for (const route of [
'/tasks/pending', '/cartons/resolve', '/cartons/count',
'/pallets/bind-pending', '/seal'
'/pallets/bind-pending', '/seal', '/unseal'
]) assert.match(api, new RegExp(route.replaceAll('/', '\\/')))
assert.doesNotMatch(api, /apiDownload|downloadAllDropshipPalletLabels|pallets\/print/)
assert.match(api, /tasks\/pending\?\$\{params\.join\('&'\)\}/)
@@ -61,12 +61,14 @@ test('palletization UI accepts carton and pre-generated pallet scans in either o
assert.match(work, /startScanBroadcast/)
assert.match(work, /lineDiffers[\s\S]*?ACCEPT_VARIANCE/)
assert.match(work, /bindDropshipPendingCartons/)
assert.match(work, /palletNo: this\.currentPallet/)
assert.match(work, /palletNo: this\.assignableCurrentPallet/)
assert.match(work, /继续装其他入仓单/)
assert.match(work, /selectedPalletNo/)
assert.match(work, /已选择仓库开放托盘/)
assert.match(work, /直接扫描托盘码,只显示当前操作的托盘/)
assert.match(work, /currentPalletDetails/)
assert.match(work, /解除封托/)
assert.match(work, /<uni-popup ref="unsealPopup"/)
assert.doesNotMatch(work, /v-for="pallet in task\.pallets"/)
assert.doesNotMatch(work, /downloadDropshipPalletLabel|downloadAllDropshipPalletLabels|打开当前托盘 A4 单|打开全部 A4 托盘单/)
assert.match(work, /formatApiError/)
+7 -5
View File
@@ -20,12 +20,14 @@ test('palletization uses the test workbench and canonical routes', async () => {
assert.doesNotMatch(pages, /dropship-palletizing/)
assert.match(await read('../pages/home/home.vue'), /'一件代发': '\/pages\/dropship-tasks\/dropship-tasks'/)
})
test('formal palletization preserves both scan orders, moves and sealing guards', () => {
for (const symbol of ['resolveDropshipCarton', 'countDropshipCarton', 'bindDropshipPendingCartons', 'moveDropshipCarton', 'sealDropshipPallet', 'planDropshipScan', 'restoreDropshipPalletizingDraft']) assert.ok(page.includes(symbol))
test('formal palletization preserves both scan orders, moves, sealing and safe unsealing', () => {
for (const symbol of ['resolveDropshipCarton', 'countDropshipCarton', 'bindDropshipPendingCartons', 'moveDropshipCarton', 'sealDropshipPallet', 'unsealDropshipPallet', 'planDropshipScan', 'restoreDropshipPalletizingDraft']) assert.ok(page.includes(symbol))
assert.match(page, /移回待绑托/)
assert.match(page, /palletSetupReady/)
assert.match(page, /pallet.status !== 'OPEN'/)
assert.match(page, /pallet\?\.status === 'SEALED'/)
assert.match(page, /currentPalletDetails\?\.cartons/)
assert.match(page, /<uni-popup ref="unsealPopup"/)
assert.match(page, /确认解除封托/)
assert.doesNotMatch(page, /模拟成功|actualSkuQuantity/)
})
test('palletization preserves compact multi-SKU input without desktop printing actions', () => {
@@ -33,8 +35,8 @@ test('palletization preserves compact multi-SKU input without desktop printing a
assert.match(page, /quantity-stepper/)
assert.doesNotMatch(page, /printPallet|printAllPallets|打开当前托盘 A4 单|打开全部 A4 托盘单/)
})
test('count and move use the formal multi-SKU contract with versioned retries', () => {
for (const path of ['cartons/count', 'pallets/bind-pending', '/move', '/seal']) assert.ok(api.includes(path))
test('count, move, seal and unseal use the formal contract with versioned retries', () => {
for (const path of ['cartons/count', 'pallets/bind-pending', '/move', '/seal', '/unseal']) assert.ok(api.includes(path))
for (const field of ['skuLines', 'actualQuantity', 'discrepancyAction', 'discrepancyRemark']) assert.ok(page.includes(field))
assert.match(api, /expectedVersion: pallet.version/)
assert.match(api, /stableOperationId/)