This commit is contained in:
2026-09-20 16:55:27 +08:00
parent 486d5163b2
commit 308f7573c1
9 changed files with 354 additions and 98 deletions
@@ -5,6 +5,12 @@ import test from 'node:test'
const view = readFileSync(new URL('./WarehouseServiceView.vue', import.meta.url), 'utf8')
const api = readFileSync(new URL('../api/warehouseServices.ts', import.meta.url), 'utf8')
test('贴标总文件与关联模板保持左右分组,退货来源使用专用明细', () => {
assert.match(view, /class="warehouse-file-groups" :class="\{ 'warehouse-file-groups--single': isReturnRelabelSource \}"/)
assert.match(view, /warehouse-service-page--return-relabel/)
assert.match(view, /const sourceValue = `RETURN_ORDER:\$\{requestedReturnNo\}`/)
})
test('仓储转运先选择入仓方式并按方式切换地址信息', () => {
assert.match(view, /value="WAREHOUSE_PICKUP">仓库上门提货/)
assert.match(view, /value="CUSTOMER_DELIVERY">客户送货到仓/)
@@ -91,7 +97,7 @@ test('仓储转运货物明细可按 SKU 和箱数打印客户预贴箱唛', ()
test('仓储转运换标资料按步骤分组展示', () => {
assert.match(view, /<span v-if="props\.service === 'transfer'" class="warehouse-step-number">1<\/span>货物明细/)
assert.match(view, /<span class="warehouse-step-number">2<\/span>换标申请/)
assert.match(view, /<span>3<\/span>明细关联模板/)
assert.match(view, /<strong><span>3<\/span>明细关联模板<\/strong>/)
assert.match(view, /<span class="warehouse-step-number">4<\/span>绑定明细/)
assert.match(view, /warehouse-transfer-template-group/)
assert.match(view, /warehouse-transfer-relabel/)