Merge branch 'release/test' of http://git.buggoglobal.com/html/admin-web into dev

This commit is contained in:
2026-09-01 10:18:48 +08:00
221 changed files with 6764 additions and 5701 deletions
@@ -29,6 +29,8 @@ describe('overseas inventory presentation adapter', () => {
expect(row).toMatchObject({
id: '2089652067743272963',
customerId: '990018',
owner: 'Acceptance Customer',
warehouse: 'Acceptance US Warehouse',
sku: 'SKU-ACCEPT-1',
productName: '验收商品',
location: '—',
@@ -40,6 +42,30 @@ describe('overseas inventory presentation adapter', () => {
})
})
it('shows an unknown owner as a dash and never substitutes customerId', () => {
const row = toInventoryListItem({
id: '1', customerId: '2092618717861048321', customerName: null,
overseasWarehouseId: '3', inboundOrderId: '4', inboundCode: 'IN-1',
totalPackages: 1, availablePackages: 1, holdPackages: 0, allocatedPackages: 0,
pickedPackages: 0, inTransitPackages: 0, receivingPackages: 0, procurementPackages: 0,
})
expect(row.owner).toBe('—')
expect(row.owner).not.toBe(row.customerId)
})
it('uses only the formal overseas warehouse name snapshot', () => {
const row = toInventoryListItem({
id: '1', customerId: '2', customerName: '客户甲', overseasWarehouseId: '3',
overseasWarehouseCode: 'LAX', overseasWarehouseName: null, destinationWarehouseName: 'ONT8目的仓',
inboundOrderId: '4', inboundCode: 'IN-1', totalPackages: 1, availablePackages: 1,
holdPackages: 0, allocatedPackages: 0, pickedPackages: 0, inTransitPackages: 0,
receivingPackages: 0, procurementPackages: 0,
})
expect(row.warehouse).toBe('—')
expect(row.warehouse).not.toBe('LAX')
expect(row.warehouse).not.toBe('ONT8目的仓')
})
it('falls back to the English product name only when the Chinese name is absent', () => {
expect(inventoryProductName({
id: '1', customerId: '2', overseasWarehouseId: '3', inboundOrderId: '4', inboundCode: 'IN-1',