feat: count mixed-SKU cartons on PDA
This commit is contained in:
@@ -88,7 +88,7 @@ test('workbench, module, history and profile are independent sources', async ()
|
||||
for (const text of ['首页', '库内作业', 'home-operation-grid', 'home-operation-primary', '开始作业', 'uni-icons']) assert.match(home, new RegExp(text))
|
||||
assert.doesNotMatch(home, /getPickingOverview|pendingBoxCount|箱待拣/)
|
||||
assert.doesNotMatch(home, /BottomNav|status-strip|task-card/)
|
||||
for (const text of ['业务模块', '业务功能', '一件代发', '出库拣货', '库位查询']) assert.match(module, new RegExp(text))
|
||||
for (const text of ['业务模块', '业务功能', '一件代发', '出库拣货']) assert.match(module, new RegExp(text))
|
||||
assert.match(home, /:disabled="!operation\.available"/)
|
||||
assert.match(home, /home-operation-disabled/)
|
||||
assert.match(home, /home-operation-meta home-operation-pending/)
|
||||
@@ -106,21 +106,24 @@ test('workbench, module, history and profile are independent sources', async ()
|
||||
assert.doesNotMatch([home, module, history, profile].join('\n'), /BottomNav/)
|
||||
})
|
||||
|
||||
test('home exposes only the three confirmed operations and keeps hidden definitions', async () => {
|
||||
test('home exposes only the two confirmed operations and keeps hidden definitions', async () => {
|
||||
const data = await read('../data/demo-data.js')
|
||||
const { MODULES } = await import('../data/demo-data.js')
|
||||
for (const text of ['入库', '出库', '库存', '查询', '出库拣货']) assert.match(data, new RegExp(text))
|
||||
assert.match(data, /key: 'inbound'[\s\S]*?name: '一件代发'[\s\S]*?available: true, visible: true/)
|
||||
assert.match(data, /key: 'outbound'[\s\S]*?name: '出库拣货'[\s\S]*?available: true, visible: true/)
|
||||
assert.match(data, /key: 'query'[\s\S]*?name: '库位查询'[\s\S]*?available: true, visible: true/)
|
||||
assert.match(await read('../pages/home/home.vue'), /operations: module\.operations\.filter\(\(operation\) => operation\.visible\)/)
|
||||
assert.deepEqual(MODULES.flatMap((module) => module.operations
|
||||
.filter((operation) => operation.visible)
|
||||
.map((operation) => `${module.key}:${operation.name}`)), [
|
||||
'inbound:一件代发',
|
||||
'outbound:出库拣货',
|
||||
'query:库位查询'
|
||||
'outbound:出库拣货'
|
||||
])
|
||||
const locationQuery = MODULES.find((module) => module.key === 'query')?.operations
|
||||
.find((operation) => operation.name === '库位查询')
|
||||
assert.ok(locationQuery)
|
||||
assert.ok(!locationQuery.visible)
|
||||
assert.ok(!locationQuery.available)
|
||||
assert.ok(MODULES.flatMap((module) => module.operations).some((operation) => operation.name === '到货收货' && !operation.visible))
|
||||
for (const boxNo of ['CBX-20260709-001', 'CBX-20260709-002', 'CBX-20260709-003']) assert.match(data, new RegExp(boxNo))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user