@@ -71,8 +71,8 @@ describe('ContainersView', () => {
vi . mocked ( getTerminalDrayageHistory ) . mockResolvedValue ( [ ] )
vi . mocked ( selectTerminalDrayageFleet ) . mockResolvedValue ( { . . . drayage , fleetSupplierId : '502' , fleetSupplierName : '新车队' , version : 4 , allowedActions : [ . . . drayage . allowedActions ] } )
vi . mocked ( recordTerminalDrayageEmptyReturn ) . mockReset ( ) . mockResolvedValue ( { . . . drayage , status : 'EMPTY_RETURNED' , actualEmptyReturnAt : '2026-09-11T13:00:00' , version : 4 , emptyReturnWarning : { status : 'RESOLVED' , deadlineAt : '2026-09-10T10:00:00' , overdueHours : 0 , overdueDays : 0 } , allowedActions : [ 'SELECT_FLEET' ] } )
vi . mocked ( listContainers ) . mockResolvedValue ( { records : [ { id : '9001' , planId : null , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , sourceType : 'SIMULATION' , allowedActions : [ 'EDIT_CONTAINER' , 'SELECT_FLEET' , 'SCHEDULE_PICKUP' , 'RECORD_PICKUP' , 'RECORD_EMPTY_RETURN' ] , terminalDrayage : drayage , oceanBookingId : null , warehouseId : '8' , warehouseName : '义乌仓' , channelGroupCode : 'MATSON_CLX' , channelCode : null , channelName : null , containerType : '40HC ' , planStatus : 'WAIT_LOADING' , version : 0 , billOfLadingNo : null , vesselName : null , voyageNo : null , shippingCompanyId : null , shippingCompanyName : null , departurePortCode : null , departurePortName : '宁波' , destinationPortCode : null , destinationPortName : '长滩' , destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 76 , maxWeightKg : 28000 , terminalTruckingCompanyId : null , terminalTruckingCompany : null , loadingAt : null , estimatedSailingAt : null , actualSailingAt : null , estimatedPortArrivalAt : null , actualPortArrivalAt : null , estimatedWarehouseArrivalAt : null , actualWarehouseArrivalAt : null } ] , page : 1 , size : 20 , total : 1 , pages : 1 } )
vi . mocked ( getContainer ) . mockResolvedValue ( { id : '9001' , planId : null , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , sourceType : 'SIMULATION' , allowedActions : [ 'EDIT_CONTAINER' ] , oceanBookingId : null , warehouseId : '8' , warehouseName : '义乌仓' , channelGroupCode : 'MATSON_CLX' , channelCode : null , channelName : null , containerType : '40HC ' , planStatus : 'WAIT_LOADING' , version : 0 , billOfLadingNo : null , vesselName : null , voyageNo : null , shippingCompanyId : null , shippingCompanyName : null , departurePortCode : null , departurePortName : '宁波' , destinationPortCode : null , destinationPortName : '长滩' , destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 76 , maxWeightKg : 28000 , terminalTruckingCompanyId : null , terminalTruckingCompany : null , loadingAt : null , estimatedSailingAt : null , actualSailingAt : null , estimatedPortArrivalAt : null , actualPortArrivalAt : null , estimatedWarehouseArrivalAt : null , actualWarehouseArrivalAt : null } )
vi . mocked ( listContainers ) . mockResolvedValue ( { records : [ { id : '9001' , planId : null , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , sourceType : 'SIMULATION' , allowedActions : [ 'EDIT_CONTAINER' , 'SELECT_FLEET' , 'SCHEDULE_PICKUP' , 'RECORD_PICKUP' , 'RECORD_EMPTY_RETURN' ] , terminalDrayage : drayage , oceanBookingId : null , warehouseId : '8' , warehouseName : '义乌仓' , channelGroupCode : 'MATSON_CLX' , channelCode : null , channelName : null , containerType : '40HQ ' , planStatus : 'WAIT_LOADING' , version : 0 , billOfLadingNo : null , vesselName : null , voyageNo : null , shippingCompanyId : null , shippingCompanyName : null , departurePortCode : null , departurePortName : '宁波' , destinationPortCode : null , destinationPortName : '长滩' , destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 68 , maxWeightKg : 19500 , terminalTruckingCompanyId : null , terminalTruckingCompany : null , loadingAt : null , estimatedSailingAt : null , actualSailingAt : null , estimatedPortArrivalAt : null , actualPortArrivalAt : null , estimatedWarehouseArrivalAt : null , actualWarehouseArrivalAt : null } ] , page : 1 , size : 20 , total : 1 , pages : 1 } )
vi . mocked ( getContainer ) . mockResolvedValue ( { id : '9001' , planId : null , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , sourceType : 'SIMULATION' , allowedActions : [ 'EDIT_CONTAINER' ] , oceanBookingId : null , warehouseId : '8' , warehouseName : '义乌仓' , channelGroupCode : 'MATSON_CLX' , channelCode : null , channelName : null , containerType : '40HQ ' , planStatus : 'WAIT_LOADING' , version : 0 , billOfLadingNo : null , vesselName : null , voyageNo : null , shippingCompanyId : null , shippingCompanyName : null , departurePortCode : null , departurePortName : '宁波' , destinationPortCode : null , destinationPortName : '长滩' , destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 68 , maxWeightKg : 19500 , terminalTruckingCompanyId : null , terminalTruckingCompany : null , loadingAt : null , estimatedSailingAt : null , actualSailingAt : null , estimatedPortArrivalAt : null , actualPortArrivalAt : null , estimatedWarehouseArrivalAt : null , actualWarehouseArrivalAt : null } )
vi . mocked ( getContainerOverview ) . mockResolvedValue ( { container : { id : '9001' , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , status : 'WAIT_LOADING' , warehouseId : '8' , warehouseName : '义乌仓' , voyageNo : null , vesselName : null , version : 0 } , loadingPlanId : null , pda : null , documents : [ ] , exception : { active : false , reason : null , markedBy : null , markedByName : null , markedAt : null } , exceptionHistory : [ ] , timeline : [ ] } )
} )
@@ -292,10 +292,10 @@ describe('ContainersView', () => {
it ( 'uses stable view labels when cabinetNo is missing' , async ( ) = > {
const base = {
id : '9001' , planId : null , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , warehouseId : '8' , warehouseName : '义乌仓' , containerType : '40HC ' , planStatus : 'WAIT_LOADING' as const , version : 0 ,
id : '9001' , planId : null , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , warehouseId : '8' , warehouseName : '义乌仓' , containerType : '40HQ ' , planStatus : 'WAIT_LOADING' as const , version : 0 ,
billOfLadingNo : null , vesselName : null , voyageNo : null , shippingCompanyId : null , shippingCompanyName : null ,
departurePortCode : null , departurePortName : '宁波' , destinationPortCode : null , destinationPortName : '长滩' ,
destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 76 , maxWeightKg : 28000 ,
destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 68 , maxWeightKg : 19500 ,
terminalTruckingCompanyId : null , terminalTruckingCompany : null , loadingAt : null , estimatedSailingAt : null , actualSailingAt : null ,
estimatedPortArrivalAt : null , actualPortArrivalAt : null , estimatedWarehouseArrivalAt : null , actualWarehouseArrivalAt : null ,
}
@@ -321,10 +321,10 @@ describe('ContainersView', () => {
it ( 'routes each plan status to its owning workflow without reopening pushed drafts' , async ( ) = > {
const base = {
id : '9001' , planId : '9101' , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , warehouseId : '8' , warehouseName : '义乌仓' , channelGroupCode : 'MATSON_CLX' , channelCode : null , channelName : null , containerType : '40HC ' , version : 0 ,
id : '9001' , planId : '9101' , bookingNo : 'BK-1' , cabinetNo : 'CB-1' , containerNo : 'MSCU-1' , warehouseId : '8' , warehouseName : '义乌仓' , channelGroupCode : 'MATSON_CLX' , channelCode : null , channelName : null , containerType : '40HQ ' , version : 0 ,
billOfLadingNo : null , vesselName : null , voyageNo : null , shippingCompanyId : null , shippingCompanyName : null ,
departurePortCode : null , departurePortName : '宁波' , destinationPortCode : null , destinationPortName : '长滩' ,
destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 76 , maxWeightKg : 28000 ,
destinationWarehouseCode : null , destinationWarehouseName : null , capacityCbm : 68 , maxWeightKg : 19500 ,
terminalTruckingCompanyId : null , terminalTruckingCompany : null , loadingAt : null , estimatedSailingAt : null , actualSailingAt : null ,
estimatedPortArrivalAt : null , actualPortArrivalAt : null , estimatedWarehouseArrivalAt : null , actualWarehouseArrivalAt : null ,
}
@@ -561,7 +561,7 @@ describe('ContainersView', () => {
link . click ( )
await flushPromises ( )
expect ( wrapper . findAllComponents ( AppDialog ) . find ( ( dialog ) = > dialog . props ( 'title' ) === '关联已放舱订舱' ) ? . props ( 'modelValue' ) ) . toBe ( true )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledWith ( { warehouseId : '8' , channelGroupCode : 'MATSON_CLX' , containerType : '40HC ' , page : 1 , size : 200 } )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledWith ( { warehouseId : '8' , channelGroupCode : 'MATSON_CLX' , containerType : '40HQ ' , page : 1 , size : 200 } )
} finally {
wrapper . unmount ( )
}
@@ -586,7 +586,7 @@ describe('ContainersView', () => {
expect ( source ) . not . toContain ( '新增货柜' )
expect ( simulationSource ) . toContain ( '新增模拟柜' )
expect ( simulationSource ) . toContain ( 'createContainerSimulation({ ...simulationForm })' )
expect ( simulationSource ) . toContain ( "channelGroupCode: '', warehouseId: '', containerType: '40HC' , capacityCbm: 7 6, maxWeightKg: 280 00" )
expect ( simulationSource ) . toContain ( "channelGroupCode: '', warehouseId: '', containerType: DEFAULT_CONTAINER_TYPE , capacityCbm: 68 , maxWeightKg: 195 00" )
expect ( source ) . toContain ( 'CONTAINER_SPECIFICATIONS' )
expect ( simulationSource ) . toContain ( 'selectSimulationContainerType' )
expect ( simulationSource ) . toContain ( '服务端会生成稳定的柜次号' )
@@ -594,7 +594,10 @@ describe('ContainersView', () => {
expect ( source ) . not . toContain ( 'v-model="form.cabinetNo"' )
expect ( source ) . not . toContain ( 'cabinetNo: form.cabinetNo.trim()' )
expect ( source ) . not . toContain ( 'openCreate' )
expect ( source ) . not . toContain ( "[ '20GP','40GP','40HQ','45HQ']" )
expect ( source ) . not . toContain ( '20GP' )
expect ( source ) . not . toContain ( '40HC' )
expect ( source ) . not . toContain ( '40NR' )
expect ( source ) . not . toContain ( '45HC' )
expect ( source ) . not . toContain ( 'v-model="form.capacityCbm"' )
expect ( source ) . not . toContain ( 'v-model="form.maxWeightKg"' )
} )
@@ -603,7 +606,7 @@ describe('ContainersView', () => {
vi . mocked ( listContainers ) . mockResolvedValue ( { records : [ {
id : '215' , planId : null , bookingNo : 'CB-260825-0215' , cabinetNo : 'CAB-260825-0215' , containerNo : null ,
sourceType : 'SIMULATION' , allowedActions : [ 'EDIT_CONTAINER' ] , oceanBookingId : null , warehouseId : '193000000000200002' , warehouseName : '东莞仓' ,
channelGroupCode : 'EXX' , channelCode : null , channelName : null , containerType : '45HC ' , planStatus : 'EDITING' ,
channelGroupCode : 'EXX' , channelCode : null , channelName : null , containerType : '45HQ ' , planStatus : 'EDITING' ,
capacityCbm : 86 , maxWeightKg : 29000 , version : 7 ,
} ] , page : 1 , size : 20 , total : 1 , pages : 1 } as never )
vi . mocked ( listOceanBookingLinkCandidates ) . mockResolvedValueOnce ( { records : [ ] , page : 1 , size : 200 , total : 0 , pages : 0 } )
@@ -617,7 +620,7 @@ describe('ContainersView', () => {
. filter ( ( item ) = > item . textContent ? . includes ( '关联已放舱订舱' ) ) . at ( - 1 ) ! . click ( )
await flushPromises ( )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledWith ( { warehouseId : '193000000000200002' , channelGroupCode : 'EXX' , containerType : '45HC ' , page : 1 , size : 200 } )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledWith ( { warehouseId : '193000000000200002' , channelGroupCode : 'EXX' , containerType : '45HQ ' , page : 1 , size : 200 } )
expect ( ( wrapper . findComponent ( OceanBookingLinkDialog ) . vm as unknown as { candidates : unknown [ ] } ) . candidates ) . toEqual ( [ ] )
expect ( readFileSync ( resolve ( process . cwd ( ) , 'src/modules/container-loading/components/OceanBookingLinkDialog.vue' ) , 'utf8' ) )
. toContain ( '暂无符合当前装柜仓库、物流渠道和柜型的已放舱需求' )
@@ -628,7 +631,7 @@ describe('ContainersView', () => {
it . each ( [ undefined , null , '' , '客户一' ] ) ( 'renders optional booking customer %s without leaking a missing value' , async ( customerName ) = > {
vi . mocked ( listOceanBookingLinkCandidates ) . mockResolvedValueOnce ( { records : [ {
oceanBookingId : '315' , bookingNo : 'OB-OPTIONAL-CUSTOMER' , requirementId : '45315' ,
containerType : '40HC ' , remainingQuantity : 1 , customerName , warehouseName : '义乌仓' , channelName : 'EXX海卡' ,
containerType : '40HQ ' , remainingQuantity : 1 , customerName , warehouseName : '义乌仓' , channelName : 'EXX海卡' ,
} ] , page : 1 , size : 200 , total : 1 , pages : 1 } as never )
const router = createTestRouter ( )
await router . push ( '/' ) ; await router . isReady ( )
@@ -639,7 +642,7 @@ describe('ContainersView', () => {
Array . from ( document . body . querySelectorAll < HTMLElement > ( '.el-dropdown-menu__item' ) )
. filter ( ( item ) = > item . textContent ? . includes ( '关联已放舱订舱' ) ) . at ( - 1 ) ! . click ( )
await flushPromises ( )
const label = ` OB-OPTIONAL-CUSTOMER · 40HC × 1 · ${ customerName || '未关联客户' } · 义乌仓 · EXX海卡 `
const label = ` OB-OPTIONAL-CUSTOMER · 40HQ × 1 · ${ customerName || '未关联客户' } · 义乌仓 · EXX海卡 `
expect ( document . body . textContent ) . toContain ( label )
expect ( ( wrapper . findComponent ( OceanBookingLinkDialog ) . vm as unknown as { candidates : Array < { label : string } > } ) . candidates [ 0 ] ? . label ) . toBe ( label )
wrapper . unmount ( )
@@ -650,7 +653,7 @@ describe('ContainersView', () => {
vi . mocked ( listContainers ) . mockResolvedValue ( { records : [ {
id : '315' , planId : null , bookingNo : 'CB-CAPACITY-SNAPSHOT' , cabinetNo : 'CAB-CAPACITY-SNAPSHOT' , containerNo : null ,
sourceType : 'SIMULATION' , allowedActions : [ 'EDIT_CONTAINER' ] , oceanBookingId : null , warehouseId : '193000000000200002' , warehouseName : '东莞仓' ,
channelGroupCode : 'EXX' , channelCode : null , channelName : null , containerType : '45HC ' , planStatus : 'WAIT_LOADING' ,
channelGroupCode : 'EXX' , channelCode : null , channelName : null , containerType : '45HQ ' , planStatus : 'WAIT_LOADING' ,
capacityCbm : 86 , maxWeightKg : 29000 , version : 7 ,
} ] , page : 1 , size : 20 , total : 1 , pages : 1 } as never )
vi . mocked ( listOceanBookingLinkCandidates ) . mockReturnValueOnce ( new Promise ( ( resolve ) = > { resolveCandidates = resolve } ) )
@@ -668,11 +671,11 @@ describe('ContainersView', () => {
linkAction . click ( )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledTimes ( 1 )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledWith ( { warehouseId : '193000000000200002' , channelGroupCode : 'EXX' , containerType : '45HC ' , page : 1 , size : 200 } )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledWith ( { warehouseId : '193000000000200002' , channelGroupCode : 'EXX' , containerType : '45HQ ' , page : 1 , size : 200 } )
expect ( getOceanBooking ) . not . toHaveBeenCalled ( )
resolveCandidates ( { records : [ { oceanBookingId : '315' , bookingNo : 'OB-CAPACITY-SNAPSHOT' , requirementId : '45315' , containerType : '45HC ' , capacityCbm : 85 , maxWeightKg : 28500 , requiredQuantity : 1 , allocatedQuantity : 0 , remainingQuantity : 1 , customerName : '客户' , warehouseName : '东莞仓' , channelName : '纽约铁路' } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
resolveCandidates ( { records : [ { oceanBookingId : '315' , bookingNo : 'OB-CAPACITY-SNAPSHOT' , requirementId : '45315' , containerType : '45HQ ' , capacityCbm : 85 , maxWeightKg : 28500 , requiredQuantity : 1 , allocatedQuantity : 0 , remainingQuantity : 1 , customerName : '客户' , warehouseName : '东莞仓' , channelName : '纽约铁路' } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
await flushPromises ( )
expect ( document . body . textContent ) . toContain ( 'OB-CAPACITY-SNAPSHOT · 45HC × 1' )
expect ( document . body . textContent ) . toContain ( 'OB-CAPACITY-SNAPSHOT · 45HQ × 1' )
expect ( ( wrapper . findComponent ( OceanBookingLinkDialog ) . vm as unknown as { candidates : Array < { key : string } > } ) . candidates [ 0 ] ? . key ) . toBe ( '315:45315' )
wrapper . unmount ( )
} )
@@ -701,9 +704,9 @@ describe('ContainersView', () => {
await flushPromises ( )
Array . from ( document . body . querySelectorAll < HTMLElement > ( '.el-dropdown-menu__item' ) )
. filter ( ( item ) = > item . textContent ? . includes ( '关联已放舱订舱' ) ) . at ( - 1 ) ! . click ( )
resolveSecond ( { records : [ { oceanBookingId : '303' , bookingNo : 'OB-LATEST' , requirementId : '404' , containerType : '40HC ' , capacityCbm : 76 , maxWeightKg : 28000 , requiredQuantity : 1 , allocatedQuantity : 0 , remainingQuantity : 1 , customerName : '客户' , warehouseName : '义乌仓' , channelName : '美森正班海卡包税' } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
resolveSecond ( { records : [ { oceanBookingId : '303' , bookingNo : 'OB-LATEST' , requirementId : '404' , containerType : '40HQ ' , capacityCbm : 68 , maxWeightKg : 19500 , requiredQuantity : 1 , allocatedQuantity : 0 , remainingQuantity : 1 , customerName : '客户' , warehouseName : '义乌仓' , channelName : '美森正班海卡包税' } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
await flushPromises ( )
resolveFirst ( { records : [ { oceanBookingId : '101' , bookingNo : 'OB-STALE' , requirementId : '202' , containerType : '40HC ' , capacityCbm : 76 , maxWeightKg : 28000 , requiredQuantity : 1 , allocatedQuantity : 0 , remainingQuantity : 1 , customerName : '客户' , warehouseName : '义乌仓' , channelName : '美森正班海卡包税' } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
resolveFirst ( { records : [ { oceanBookingId : '101' , bookingNo : 'OB-STALE' , requirementId : '202' , containerType : '40HQ ' , capacityCbm : 68 , maxWeightKg : 19500 , requiredQuantity : 1 , allocatedQuantity : 0 , remainingQuantity : 1 , customerName : '客户' , warehouseName : '义乌仓' , channelName : '美森正班海卡包税' } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
await flushPromises ( )
expect ( listOceanBookingLinkCandidates ) . toHaveBeenCalledTimes ( 2 )
@@ -715,7 +718,7 @@ describe('ContainersView', () => {
it ( 'backfills a legacy trucking supplier name and submits the frozen id-name pair' , async ( ) = > {
vi . mocked ( listSuppliers ) . mockResolvedValue ( { records : [ { id : '9007199254740998' , tenantId : '1' , name : '测试拖车供应商' , category : 'TRUCKING' , carrierCodes : [ ] , region : 'CN' , legalRepresentative : '张三' , contactName : '李四' , phone : '13800000000' , email : null , address : null , businessLicenseNo : null , licenseFileId : null , status : 'ACTIVE' , settlementPeriod : 'MONTHLY_30' , remark : null , createdBy : null , createdAt : '2026-08-25T10:00:00' , updatedBy : null , updatedAt : '2026-08-25T10:00:00' , deleted : false , version : 0 } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
vi . mocked ( getContainer ) . mockResolvedValueOnce ( { id : '9001' , allowedActions : [ 'EDIT_CONTAINER' ] , planStatus : 'WAIT_LOADING' , containerType : '40HC ' , warehouseId : '8' , terminalTruckingCompanyId : null , terminalTruckingCompany : '测试拖车供应商' } as never )
vi . mocked ( getContainer ) . mockResolvedValueOnce ( { id : '9001' , allowedActions : [ 'EDIT_CONTAINER' ] , planStatus : 'WAIT_LOADING' , containerType : '40HQ ' , warehouseId : '8' , terminalTruckingCompanyId : null , terminalTruckingCompany : '测试拖车供应商' } as never )
vi . mocked ( updateContainer ) . mockResolvedValue ( { } as never )
const router = createTestRouter ( )
await router . push ( '/' ) ; await router . isReady ( )
@@ -735,7 +738,7 @@ describe('ContainersView', () => {
it ( 'clears the trucking supplier id and name together' , async ( ) = > {
vi . mocked ( listSuppliers ) . mockResolvedValue ( { records : [ { id : '9007199254740998' , tenantId : '1' , name : '测试拖车供应商' , category : 'TRUCKING' , carrierCodes : [ ] , region : 'CN' , legalRepresentative : '张三' , contactName : '李四' , phone : '13800000000' , email : null , address : null , businessLicenseNo : null , licenseFileId : null , status : 'ACTIVE' , settlementPeriod : 'MONTHLY_30' , remark : null , createdBy : null , createdAt : '2026-08-25T10:00:00' , updatedBy : null , updatedAt : '2026-08-25T10:00:00' , deleted : false , version : 0 } ] , page : 1 , size : 200 , total : 1 , pages : 1 } )
vi . mocked ( getContainer ) . mockResolvedValueOnce ( { id : '9001' , allowedActions : [ 'EDIT_CONTAINER' ] , planStatus : 'WAIT_LOADING' , containerType : '40HC ' , warehouseId : '8' , terminalTruckingCompanyId : '9007199254740998' , terminalTruckingCompany : '测试拖车供应商' } as never )
vi . mocked ( getContainer ) . mockResolvedValueOnce ( { id : '9001' , allowedActions : [ 'EDIT_CONTAINER' ] , planStatus : 'WAIT_LOADING' , containerType : '40HQ ' , warehouseId : '8' , terminalTruckingCompanyId : '9007199254740998' , terminalTruckingCompany : '测试拖车供应商' } as never )
vi . mocked ( updateContainer ) . mockResolvedValue ( { } as never )
const router = createTestRouter ( )
await router . push ( '/' ) ; await router . isReady ( )
@@ -757,7 +760,7 @@ describe('ContainersView', () => {
} )
it ( 'blocks saving a legacy trucking supplier name that no longer matches an active option' , async ( ) = > {
vi . mocked ( getContainer ) . mockResolvedValueOnce ( { id : '9001' , allowedActions : [ 'EDIT_CONTAINER' ] , planStatus : 'WAIT_LOADING' , containerType : '40HC ' , warehouseId : '8' , terminalTruckingCompanyId : null , terminalTruckingCompany : '已停用拖车供应商' } as never )
vi . mocked ( getContainer ) . mockResolvedValueOnce ( { id : '9001' , allowedActions : [ 'EDIT_CONTAINER' ] , planStatus : 'WAIT_LOADING' , containerType : '40HQ ' , warehouseId : '8' , terminalTruckingCompanyId : null , terminalTruckingCompany : '已停用拖车供应商' } as never )
vi . mocked ( updateContainer ) . mockClear ( )
const router = createTestRouter ( )
await router . push ( '/' ) ; await router . isReady ( )