feat(client): show inbound business relationships
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
const firstLeg = readFileSync(new URL('./FirstLegOrdersView.vue', import.meta.url), 'utf8')
|
||||
const quickOrder = readFileSync(new URL('./QuickOrderView.vue', import.meta.url), 'utf8')
|
||||
const customs = readFileSync(new URL('../components/CustomsDocumentsDialog.vue', import.meta.url), 'utf8')
|
||||
const overseas = readFileSync(new URL('../../overseas-warehouse/views/WarehouseServiceView.vue', import.meta.url), 'utf8')
|
||||
|
||||
test('uses business identifiers and names without visible internal-ID fallbacks', () => {
|
||||
assert.match(firstLeg, /label: '入仓码'/)
|
||||
assert.match(firstLeg, /label: '订单号'/)
|
||||
assert.match(firstLeg, /label: '柜号 \/ 柜次'/)
|
||||
assert.match(firstLeg, /label: '国内收货仓'/)
|
||||
assert.doesNotMatch(quickOrder, /result\.orderNo \|\| `草稿 \$\{result\.draftId\}`/)
|
||||
assert.doesNotMatch(quickOrder, /item\.orderNo \|\| item\.draftId/)
|
||||
assert.doesNotMatch(customs, /detail\.planNo \|\| detail\.loadingPlanId/)
|
||||
assert.doesNotMatch(overseas, /overseasWarehouseName \|\| (?:item|candidate)\.overseasWarehouseId/)
|
||||
assert.doesNotMatch(overseas, /row\(\[[^\]]*(?:item\.overseasWarehouseId|item\.operatingWarehouseId)/)
|
||||
})
|
||||
|
||||
test('keeps internal IDs only as non-rendered routing, selection, and request values', () => {
|
||||
assert.match(quickOrder, /params: \{ draftId: result\.draftId \}/)
|
||||
assert.match(customs, /uploadMerchantCustomsDocument\(detail\.value\.loadingPlanId/)
|
||||
assert.match(overseas, /:value="candidate\.orderId"/)
|
||||
assert.match(firstLeg, /detailId\.value = order\.id/)
|
||||
})
|
||||
Reference in New Issue
Block a user