This commit is contained in:
2026-08-04 12:58:04 +08:00
parent 3877af0b72
commit 7af1d0250b
2 changed files with 84 additions and 28 deletions
@@ -120,6 +120,16 @@ test('selects platform destinations by type and caches private addresses per use
assert.match(source, /私人地址不能引用平台公共仓库|form\.destinationWarehouseId = ''/)
})
test('auto-fills trusted warehouse and company data instead of asking customers to repeat it', () => {
assert.match(source, /async function selectDestinationWarehouse\(id: string\)/)
assert.match(source, /await store\.loadWarehouseDetail\(warehouse\.id\)/)
assert.match(source, /availableWarehouses\.value\.length === 1/)
assert.match(source, /availableDestinationWarehouses\.value\.length === 1/)
assert.match(source, /function createPickupPartySnapshot\(\)/)
assert.match(source, /contactName: tenantStore\.company\.contactName/)
assert.match(source, /selectedDestinationWarehouse\.address/)
})
test('collects the backend-required first-leg fields', () => {
for (const model of ['destinationCountryCode', 'destinationWarehouseName', 'channelCode', 'pickupMethod', 'taxMode', 'destinationType', 'packageType', 'upc']) {
assert.match(source, new RegExp(`v-model="(?:form|item)\\.${model}"`))
@@ -128,9 +138,11 @@ test('collects the backend-required first-leg fields', () => {
})
test('distills order creation into the confirmed prototype sections without fake pricing', () => {
assert.match(source, /<h3>下单信息<\/h3>/)
assert.match(source, /<h3>目的地信息<\/h3>/)
assert.match(source, /<h3>发货信息<\/h3>/)
assert.match(source, /<h3>货物明细<\/h3>/)
assert.doesNotMatch(source, /<h3>发货信息<\/h3>|<h3>目的地信息<\/h3>/)
assert.ok(source.indexOf('<h3>发货信息</h3>') < source.indexOf('<h3>目的地信息</h3>'))
assert.ok(source.indexOf('<h3>目的地信息</h3>') < source.indexOf('<h3>货物明细</h3>'))
assert.match(source, /class="segmented-options"/)
assert.match(source, /class="prototype-form-row prototype-form-row--tabs"/)
assert.match(source, /class="cargo-primary-grid"/)