优化
This commit is contained in:
@@ -19,6 +19,8 @@ test('declares the documented merchant warehouse and first-leg endpoints', () =>
|
||||
|
||||
test('maps transport and status fields instead of treating container mode as transport mode', () => {
|
||||
assert.match(storeSource, /order\.transportMode === 'SEA'.*order\.containerMode === 'FULL_CONTAINER' \? 'FCL' : 'LCL'/s)
|
||||
assert.match(storeSource, /order\.id \?\? order\.orderId \?\? ''/)
|
||||
assert.match(storeSource, /order\.transportMode \? clientTransport\(order\) : null/)
|
||||
assert.match(storeSource, /draft\.transportMode === 'ROAD'\) return 'TRUCK'/)
|
||||
assert.match(storeSource, /status === 'SUBMITTED'\) return 'PENDING_REVIEW'/)
|
||||
assert.match(storeSource, /status === 'REJECTED'\) return 'PENDING_REVIEW'/)
|
||||
@@ -88,6 +90,16 @@ test('sends backend-required channel, pricing, customs, destination and cargo fi
|
||||
assert.match(storeSource, /destinationWarehouseId: draft\.destinationType === 'PRIVATE' \? undefined : draft\.destinationWarehouseId/)
|
||||
assert.match(storeSource, /draft\.pickupMethod === 'PICKUP'.*draft\.shipperPartySnapshot/s)
|
||||
assert.match(storeSource, /draft\.destinationType === 'PRIVATE'.*draft\.consigneePartySnapshot/s)
|
||||
for (const field of [
|
||||
'customsHsCode', 'lengthCm', 'widthCm', 'heightCm', 'unitsPerPackage', 'totalQuantity',
|
||||
'netWeightKg', 'unitDeclaredValue', 'material', 'usage', 'model', 'brand',
|
||||
'productLengthCm', 'productWidthCm', 'productHeightCm', 'shipmentId', 'referenceId',
|
||||
'productImageFileId',
|
||||
]) {
|
||||
assert.match(storeSource, new RegExp(`${field}: item\\.`))
|
||||
}
|
||||
assert.match(apiSource, /POST[^\n]*product-images|method: 'POST', url: '\/merchant\/v1\/files\/product-images'/)
|
||||
assert.match(apiSource, /GET[^\n]*product-images|method: 'GET', url: `\/merchant\/v1\/files\/product-images\/\$\{fileId\}`/)
|
||||
})
|
||||
|
||||
test('separates domestic receiving warehouses from public destinations', () => {
|
||||
|
||||
Reference in New Issue
Block a user