优化
This commit is contained in:
@@ -87,4 +87,19 @@ describe('OutboundsView permissions and navigation', () => {
|
||||
expect(api).toContain('/platform/v1/last-leg/warehouse-transfers/bind-destination')
|
||||
expect(source).not.toContain('await createWarehouseTransferOutbound')
|
||||
})
|
||||
|
||||
it('auto-selects the sole warehouse-transfer candidate and shows destination state', () => {
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/overseas-warehouse/pages/OutboundsView.vue'), 'utf8')
|
||||
const api = readFileSync(resolve(process.cwd(), 'src/modules/overseas-warehouse/api/outbounds.ts'), 'utf8')
|
||||
expect(source).toContain("if (transferCandidates.value.length === 1) selectedTransferPalletIds.value = [transferSelectionKey(transferCandidates.value[0])]")
|
||||
expect(source).toContain("transferCandidates.value.length === 1 ? [transferCandidates.value[0]] : []")
|
||||
expect(source).toContain('label="主单目的去向"')
|
||||
expect(source).toContain("['私人仓', row.privateDestinationAddress?.trim(), row.privateDestinationPostalCode?.trim()]")
|
||||
expect(source).toContain('`FBA · ${row.destinationWarehouseCode.trim()}`')
|
||||
expect(source).toContain("return '未设置'")
|
||||
expect(api).toContain('destinationWarehouseCode?: string | null')
|
||||
expect(api).toContain("destinationType?: 'FBA' | 'PRIVATE' | null")
|
||||
expect(api).toContain('privateDestinationAddress?: string | null')
|
||||
expect(api).toContain('privateDestinationPostalCode?: string | null')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user