优化
This commit is contained in:
@@ -54,6 +54,9 @@ test('login has no committed demo credentials and inbound operation implements t
|
||||
assert.match(operation, /const payload = isFba \? \{ inboundCode: this\.activeInbound\.inboundCode, palletCode: this\.resolvedPallet\.palletCode, packageCount: Number\(this\.packageCount\) \}/)
|
||||
assert.doesNotMatch(operation, /skuCode/)
|
||||
assert.match(operation, /clearReceiptContext\(\)[\s\S]*activeScanTarget = 'carton'/)
|
||||
assert.match(operation, /\[Overseas PDA scan\] dispatch/)
|
||||
assert.match(operation, /\[Overseas PDA carton\] resolved/)
|
||||
assert.match(operation, /\[Overseas PDA carton\] failed[\s\S]*requestId[\s\S]*traceId/)
|
||||
for (const role of ['LICENSE_PLATE', 'CONTAINER_SEAL', 'DOOR_OPEN']) assert.match(adapter, new RegExp(role))
|
||||
for (const forbidden of ['customerId', 'planNo', 'allocationId', 'warehouseId', 'locationId']) assert.doesNotMatch(inbound, new RegExp(forbidden))
|
||||
assert.match(operation, /isReceivingConflict|recoverCurrentAfterConflict/)
|
||||
@@ -84,6 +87,7 @@ test('receiving phases use a compiled container summary with cabinet and aggrega
|
||||
assert.match(summary, /padding:10px 12px/)
|
||||
assert.match(summary, /destination-tags\{[^}]*flex-wrap:wrap/)
|
||||
assert.doesNotMatch(summary, /destinationSummary|text-overflow:ellipsis/)
|
||||
assert.match(operation, /v-if="phase !== 'receive'" class="receiving-heading"/)
|
||||
})
|
||||
|
||||
test('Chinese English and Spanish locale scaffolding is installed without exposing unfinished translations', async () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import test from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
|
||||
import {
|
||||
SCAN_BROADCAST_ACTION,
|
||||
@@ -16,6 +17,17 @@ test('scanner uses the confirmed PDA broadcast contract', () => {
|
||||
assert.equal(normalizeScanValue(null), '')
|
||||
})
|
||||
|
||||
test('scanner source keeps receiver diagnostics before page routing', async () => {
|
||||
const source = await readFile(new URL('../src/utils/scan-broadcast.js', import.meta.url), 'utf8')
|
||||
assert.match(source, /\[Overseas PDA broadcast\] received/)
|
||||
assert.match(source, /rawValue[\s\S]*value/)
|
||||
assert.match(source, /ignored duplicate/)
|
||||
assert.match(source, /receive failed/)
|
||||
assert.match(source, /receiver registered/)
|
||||
assert.match(source, /registration failed/)
|
||||
assert.match(source, /activity\.getPackageName\(\)/)
|
||||
})
|
||||
|
||||
test('scanner drops only immediate duplicate broadcasts', () => {
|
||||
resetScanDeduplication()
|
||||
assert.equal(isDuplicateScan('EL-38201', 1000), false)
|
||||
|
||||
Reference in New Issue
Block a user