优化
This commit is contained in:
@@ -40,6 +40,10 @@ test('shared booking data omits server-owned channelName and includes offline-co
|
||||
assert.ok(draft[key], `${key} is required`)
|
||||
}
|
||||
assert.equal(draft.channelName, undefined)
|
||||
assert.equal(draft.shippingCompanyId, null)
|
||||
assert.equal(draft.shippingCompanyName, null)
|
||||
assert.equal(draft.bookingAgentId, null)
|
||||
assert.equal(draft.bookingAgentName, null)
|
||||
assert.equal(draft.serviceTerm, 'CY-CY')
|
||||
assert.equal(draft.freightTerm, 'NINGBO')
|
||||
assert.equal(draft.containerRequirements[0].capacityCbm, 68)
|
||||
@@ -56,6 +60,15 @@ test('shared booking data omits server-owned channelName and includes offline-co
|
||||
}
|
||||
})
|
||||
|
||||
test('shared booking data never sends supplier names without valid supplier ids', () => {
|
||||
const draft = oceanBookingDraft({ marker: 'ADMIN-RUN-SUPPLIER' }, 'supplier', {
|
||||
customerId: '21', customerName: 'IT 测试客户', channelCode: 'SEA-US', channelName: '美西海运',
|
||||
warehouseId: '41', warehouseName: '深圳仓',
|
||||
}, { shippingCompanyName: '无来源船公司', bookingAgentName: '无来源代理' })
|
||||
assert.equal(draft.shippingCompanyName, null)
|
||||
assert.equal(draft.bookingAgentName, null)
|
||||
})
|
||||
|
||||
test('shared booking draft can omit customer identity without inventing placeholders', () => {
|
||||
const draft = oceanBookingDraftWithoutCustomer({ marker: 'ADMIN-RUN-OPTIONAL' }, 'optional', {
|
||||
customerId: '21', customerName: '不应写入', channelCode: 'SEA-US', channelName: '美西海运',
|
||||
|
||||
Reference in New Issue
Block a user