优化
This commit is contained in:
@@ -19,17 +19,41 @@ test('warehouse transfer PDA API exposes candidates and palletize operations', a
|
||||
|
||||
test('warehouse transfer workbench entry is registered', async () => {
|
||||
const { MODULES } = await import('../src/data/overseas-workbench.js')
|
||||
const operation = MODULES.flatMap((m) => m.operations).find((item) => item.key === 'warehouseTransfer')
|
||||
const operation = MODULES.flatMap((m) => m.operations).find((item) => item.key === 'warehouseTransferList')
|
||||
assert.equal(operation?.available, true)
|
||||
assert.equal(operation?.route, '/pages/warehouse-transfer/warehouse-transfer')
|
||||
assert.equal(operation?.route, '/pages/warehouse-transfer/warehouse-transfer?mode=list')
|
||||
const work = MODULES.flatMap((m) => m.operations).find((item) => item.key === 'warehouseTransferWork')
|
||||
assert.equal(work?.route, '/pages/warehouse-transfer/warehouse-transfer?mode=work')
|
||||
})
|
||||
|
||||
test('warehouse transfer page loads detail without exposing internal identifiers', async () => {
|
||||
const page = await readFile(new URL('../src/pages/warehouse-transfer/warehouse-transfer.vue', import.meta.url), 'utf8')
|
||||
assert.match(page, /getWarehouseTransferDetail\(item\.transferNo\)/)
|
||||
assert.match(page, /待测转运单/)
|
||||
assert.match(page, /仓储转运测量列表/)
|
||||
assert.match(page, /转运测量作业/)
|
||||
assert.match(page, /!selected && entryMode === 'list'/)
|
||||
assert.match(page, /entryMode === 'work' && taskNo/)
|
||||
assert.match(page, /mode=work&task=\$\{encodeURIComponent\(String\(item\.transferNo\)\)\}/)
|
||||
assert.match(page, /v-if="!selected && entryMode === 'list'"/)
|
||||
assert.match(page, /作业详情/)
|
||||
assert.match(page, /backToCandidates\(\)/)
|
||||
assert.match(page, /backToCandidates\(\) \{ if \(this\.submitting.*this\.entryMode = 'list'/)
|
||||
assert.match(page, /存在未完结的测量单/)
|
||||
assert.match(page, /title: '开始测量'/)
|
||||
assert.match(page, /确认开始测量转运单/)
|
||||
assert.match(page, /warehouseWork\.warehouseTransfer\.currentNo/)
|
||||
assert.match(page, /resetWarehouseDomain\('warehouseTransfer'\)/)
|
||||
assert.match(page, /statusLabel\(status, transferNo = ''\) \{ if \(String\(status\) === 'WAIT_PDA_RECEIVING'/)
|
||||
assert.match(page, /listWarehouseTransferCandidates\(\)\)\.map\(\(item\) => String\(item\.transferNo\) === activeNo.*PARTIALLY_RECEIVED/s)
|
||||
assert.doesNotMatch(page, /转运明细 ID|manualItems/)
|
||||
})
|
||||
|
||||
test('warehouse transfer removes completed work from the pending list', async () => {
|
||||
const page = await readFile(new URL('../src/pages/warehouse-transfer/warehouse-transfer.vue', import.meta.url), 'utf8')
|
||||
assert.match(page, /this\.selected = null; this\.pendingKey = '';[\s\S]*await this\.loadCandidates\(\)/)
|
||||
})
|
||||
|
||||
test('warehouse transfer shows forecast and actual variance without blocking short or over receipt', async () => {
|
||||
const page = await readFile(new URL('../src/pages/warehouse-transfer/warehouse-transfer.vue', import.meta.url), 'utf8')
|
||||
for (const label of ['客户预报', '当前实收', '短收差异', '超收差异']) assert.match(page, new RegExp(label))
|
||||
|
||||
Reference in New Issue
Block a user