优化
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user