优化
This commit is contained in:
@@ -161,5 +161,23 @@ test('合同覆盖库存CSV并明确排除暂缓、离仓、PDA与内部路径',
|
||||
assert.doesNotMatch(source, /创建本轮换标单|verifyRelabelLifecycle/)
|
||||
assert.match(source, /创建本轮公共库位/)
|
||||
assert.match(source, /公共托盘旧版本编辑返回冲突/)
|
||||
assert.doesNotMatch(source, /deploymentBlocker|addCoverageGap|coverageGap/)
|
||||
assert.doesNotMatch(source, /deploymentBlocker/)
|
||||
assert.match(source, /固定资源模式缺少海外仓,禁止自动创建仓库/)
|
||||
})
|
||||
|
||||
test('fixed customer mode reuses warehouse without location or pallet lifecycle writes', async () => {
|
||||
const context = contextFixture()
|
||||
context.options = { fixedCustomerId: '10001' }
|
||||
context.context.merchantQualificationFixture = { tenantId: '10001' }
|
||||
await run(context)
|
||||
assert.equal(context.context.phase4OverseasWarehouse.customerId, '10001')
|
||||
assert.equal(context.context.phase4OverseasWarehouse.warehouseId, '20001')
|
||||
assert.ok(context.calls.filter(call => call.method !== 'GET')
|
||||
.every(call => call.method === 'POST' && call.path === '/api/platform/v1/files/export-tasks'))
|
||||
assert.equal(context.gaps.length, 1)
|
||||
const missing = contextFixture({ warehouseRecords: [] })
|
||||
missing.options = context.options
|
||||
missing.context.merchantQualificationFixture = { tenantId: '10001' }
|
||||
await assert.rejects(run(missing), /禁止自动创建仓库/)
|
||||
assert.equal(missing.calls.some(call => call.method === 'POST' && call.path === '/api/platform/v1/warehouse-admin'), false)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user