优化
This commit is contained in:
@@ -41,6 +41,7 @@ function validDraft() {
|
||||
customerRemark: '',
|
||||
tradeTerm: 'FOB',
|
||||
destinationCountryCode: 'US',
|
||||
destinationWarehouseId: 'WH-FBA-ONT8',
|
||||
destinationWarehouseName: 'ONT8',
|
||||
pickupMethod: 'SELF_EXPRESS',
|
||||
channelCode: 'SEA-US-FBA',
|
||||
@@ -113,6 +114,20 @@ test('requires FBA reference, warehouse, shipment, SKU and UPC fields', () => {
|
||||
assert.ok(errors.includes('第 1 条货物缺少 UPC'))
|
||||
})
|
||||
|
||||
test('requires public destination ids while keeping private addresses detached from public warehouses', () => {
|
||||
const publicDraft = validDraft()
|
||||
publicDraft.destinationWarehouseId = ''
|
||||
assert.ok(validateFirstLegOrderDraft(publicDraft).includes('请选择平台维护的目的仓'))
|
||||
|
||||
const privateDraft = validDraft()
|
||||
privateDraft.destinationType = 'PRIVATE'
|
||||
privateDraft.destinationWarehouseId = 'WH-FBA-ONT8'
|
||||
privateDraft.amazonWarehouseCode = ''
|
||||
privateDraft.shipmentId = ''
|
||||
privateDraft.referenceNo = ''
|
||||
assert.ok(validateFirstLegOrderDraft(privateDraft).includes('私人地址不能引用平台公共仓库'))
|
||||
})
|
||||
|
||||
test('does not require container details for non-FCL cargo', () => {
|
||||
const draft = validDraft()
|
||||
draft.transportMode = 'AIR'
|
||||
|
||||
Reference in New Issue
Block a user