This commit is contained in:
2026-10-19 17:56:31 +08:00
parent 5a46198bf0
commit 5c28cd7c79
84 changed files with 3356 additions and 3630 deletions
@@ -3,8 +3,8 @@ import { matchesSmartDispatchWarehouseTab } from './smartDispatchWarehouseTab'
describe('smart dispatch warehouse tabs', () => {
it('uses the overseas warehouse code when the warehouse name is unavailable', () => {
const losAngeles = { overseasWarehouseCode: 'US-LAX-01', overseasWarehouseName: null }
const newYork = { overseasWarehouseCode: 'US-NY-01', overseasWarehouseName: null }
const losAngeles = { warehouseCode: 'US-LAX-01', warehouseName: '' }
const newYork = { warehouseCode: 'US-NY-01', warehouseName: '' }
expect(matchesSmartDispatchWarehouseTab(losAngeles, 'LAX')).toBe(true)
expect(matchesSmartDispatchWarehouseTab(losAngeles, 'NYC')).toBe(false)
@@ -13,7 +13,7 @@ describe('smart dispatch warehouse tabs', () => {
})
it('keeps the all tab unfiltered and supports warehouse names as a fallback', () => {
const warehouse = { overseasWarehouseCode: null, overseasWarehouseName: '洛杉矶接柜仓' }
const warehouse = { warehouseCode: '', warehouseName: '洛杉矶接柜仓' }
expect(matchesSmartDispatchWarehouseTab(warehouse, 'ALL')).toBe(true)
expect(matchesSmartDispatchWarehouseTab(warehouse, 'LAX')).toBe(true)