merge release test changes and preserve local frontend updates

This commit is contained in:
2026-09-20 15:23:50 +08:00
parent c08a10a125
commit 375e5e53ce
5 changed files with 123 additions and 38 deletions
@@ -17,11 +17,32 @@ test('总文件可以独立清除并重选同名文件,提交时禁止清除',
assert.match(view, /aria-label="清除 SKU 总文件" :disabled="saving"/)
})
test('贴标申请从当前客户仍有库存的历史入仓单选择来源', () => {
test('贴标文件按总文件和关联模板分组展示', () => {
assert.match(view, /warehouse-file-groups/)
assert.match(view, /<span>1<\/span>贴标总文件/)
assert.match(view, /必传 · 二选一/)
assert.match(view, /必传 · 两份文件/)
assert.match(view, /<span>2<\/span>明细关联模板/)
assert.match(view, /SKU 关联/)
assert.match(view, /箱号关联/)
assert.match(view, /SKU 混箱/)
assert.match(view, /warehouse-file-groups--single/)
})
test('贴标申请移除操作项下方的解释文字,保留必要状态', () => {
assert.doesNotMatch(view, /选择后仅查询当前客户在该中转仓的可用库存/)
assert.doesNotMatch(view, /托盘仅作为库内承载位置/)
assert.doesNotMatch(view, /整张贴标申请只能选择一个目的仓/)
assert.doesNotMatch(view, /SKU 与箱号关联通过仓库唛头合并/)
assert.match(view, /必传 · 二选一/)
assert.match(view, /必传 · 两份文件/)
})
test('贴标申请可从当前客户仍有库存的入仓单或退货单选择来源', () => {
assert.match(view, /海外操作仓(中转仓)/)
assert.match(view, /选择有库存的历史入仓单/)
assert.match(view, /曾经下单且当前仍有库存的入仓单/)
assert.match(view, /当前中转仓暂无已入库可用库存/)
assert.match(view, /选择有库存的入仓单或退货单/)
assert.match(view, /quantityUnit: candidate\.sourceType === 'RETURN_CARTON' \? '件' : '箱'/)
assert.match(view, /当前中转仓暂无可用库存/)
assert.match(view, /relabelInboundOptions/)
assert.match(view, /listRelabelInventoryCandidates\(form\.warehouse\)/)
assert.match(api, /relabel-applications\/inventory-candidates/)
@@ -38,12 +59,11 @@ test('客户贴标表单不展示客户单号、托盘和内部库存来源列',
test('贴标申请保留关联模板下载和上传入口', () => {
assert.match(view, /downloadRelabelTemplate/)
assert.match(view, /下载 SKU 关联模板/)
assert.match(view, /上传 SKU 关联/)
assert.match(view, /下载箱号关联模板/)
assert.match(view, /上传箱号关联/)
assert.match(view, /下载 SKU 混箱模板/)
assert.match(view, /上传 SKU 混箱/)
assert.match(view, /<strong>SKU 关联<\/strong>/)
assert.match(view, /<strong>箱号关联<\/strong>/)
assert.match(view, /<strong>SKU 混箱<\/strong>/)
assert.match(view, />下载模板<\/el-button>/)
assert.match(view, />上传文件<\/el-button>/)
assert.match(view, /skuTemplateInput\?\.click\(\)/)
assert.match(view, /cartonTemplateInput\?\.click\(\)/)
assert.match(view, /importRelabelTemplate/)
@@ -51,7 +71,7 @@ test('贴标申请保留关联模板下载和上传入口', () => {
assert.match(view, /'明细行标识', '旧箱唛', '旧SKU标签', '新SKU标签'/)
assert.match(view, /const includeDestination = false/)
assert.doesNotMatch(view, /const includeDestination = props\.service !== 'transfer'/)
assert.match(view, /SKU 与箱号关联通过仓库唛头合并/)
assert.match(view, /<strong>绑定明细<\/strong>/)
assert.match(view, /<th>仓库唛头 \*<\/th>/)
assert.doesNotMatch(view, /库存位置ID/)
})
@@ -76,7 +96,7 @@ test('上传关系支持部分或全量选择后导入本次换标明细', () =>
})
test('箱唛换标一行固定代表一箱', () => {
const cartonTable = view.match(/<div v-if="labelingMode === 'carton'" class="warehouse-table-scroll">.+?(?=<div v-else class="warehouse-table-scroll">)/s)?.[0]
const cartonTable = view.match(/<div v-if="!isReturnRelabelSource && labelingMode === 'carton'" class="warehouse-table-scroll">.+?(?=<div v-else-if="!isReturnRelabelSource" class="warehouse-table-scroll">)/s)?.[0]
assert.ok(cartonTable)
assert.match(cartonTable, /<th>箱数<\/th>/)
assert.match(cartonTable, /<td><strong>1 箱<\/strong><\/td>/)
@@ -115,22 +135,47 @@ test('箱唛相关换标必须选择四选一派送方式', () => {
assert.match(view, /labelingMode\.value !== 'sku' && !form\.deliveryMethod/)
})
test('一次申请单选库存来源且保留普通入仓或退货合箱归属', () => {
test('一次申请单选库存来源且退货库存按退货单汇总', () => {
assert.doesNotMatch(view, /multiple filterable collapse-tags/)
assert.match(view, /RETURN_CARTON:\$\{item\.returnCartonId\}/)
assert.match(view, /RETURN_ORDER:\$\{returnOrderNo\}/)
assert.match(view, /current\.availablePackages \+= inventoryQuantity\(candidate\.availablePackages\)/)
assert.match(view, /availablePackages: inventoryQuantity\(candidate\.availablePackages\)/)
assert.match(view, /const quantity = Number\(value\)/)
assert.match(view, /interface ReturnRelabelSkuRow/)
assert.match(view, /current\.availableQuantity \+= quantity/)
assert.match(view, /库存总数/)
assert.match(view, /本次贴标数量/)
assert.match(view, /returnRelabelSkuRows\.value = \[\.\.\.grouped\.values\(\)\]/)
assert.match(view, /createReturnRelabel\(selectedReturnOrderNo\.value/)
assert.match(view, /uploadReturnRelabelFile\(created\.relabelNo, fileScope, selectedFile\)/)
assert.doesNotMatch(view, /candidate\.sourceType === 'RETURN_CARTON'\) rows\.push\(\.\.\.Array\.from/)
assert.match(view, /sourceInventoryBalanceId: String\(candidate\.inventoryBalanceId\)/)
assert.match(view, /sourceInventoryPositionId: String\(position\.positionId\)/)
assert.match(view, /sourceInboundOrderId: String\(candidate\.inboundOrderId\)/)
assert.match(view, /returnCartonId: String\(candidate\.returnCartonId\)/)
assert.match(api, /sourceInventoryBalanceId\?: string; sourceInventoryPositionId\?: string; sourceInboundOrderId\?: string; returnCartonId\?: string/)
})
test('退货贴标总文件二选一且提交使用退货专用链路', () => {
assert.match(view, /cartonTotalFile\.value && !requiresBothTotalFiles\.value\) clearCreateTotalFile\('SKU_TOTAL'\)/)
assert.match(view, /skuTotalFile\.value && !requiresBothTotalFiles\.value\) clearCreateTotalFile\('CARTON_TOTAL'\)/)
assert.match(view, /fileScope = cartonTotalFile\.value \? 'CARTON_TOTAL' as const : 'SKU_TOTAL' as const/)
assert.match(view, /destinationFbaWarehouseId: String\(destination\.id\)/)
})
test('SKU 和箱唛都换时两份总文件必须同时上传', () => {
assert.match(view, /labelingMode\.value === 'carton_and_sku'/)
assert.match(view, /requiresBothTotalFiles\.value && \(!cartonTotalFile\.value \|\| !skuTotalFile\.value\)/)
assert.match(view, /必须同时上传箱唛总文件和 SKU 总文件/)
assert.match(view, /requiresBothTotalFiles \? '和' : '或'/)
assert.match(view, /必传 · 两份文件/)
})
test('海外操作仓和FBA目的仓使用独立字段', () => {
assert.match(api, /operationWarehouseId: string/)
assert.match(api, /destinationFbaWarehouseCode\?: string/)
assert.match(view, /operationWarehouseId: form\.warehouse/)
assert.match(view, /destinationFbaWarehouseCode: form\.destination/)
assert.match(view, /整张贴标申请只能选择一个目的仓/)
assert.match(view, /<el-select v-model="form\.destination"[^\n]+FBA 目的仓/)
assert.doesNotMatch(view, /v-model="row\.destinationWarehouseId"[^\n]+请选择 FBA 目的仓/)
})
@@ -179,5 +224,6 @@ test('客户详情进入页面后直接回显完工照片并支持大图预览',
})
test('进入复核后客户订单回显换标完成状态', () => {
assert.match(view, /\['CUSTOMER_CONFIRM_PENDING', 'READY_FOR_OUTBOUND', 'COMPLETED'\]\.includes\(value\) \? '换标完成'/)
assert.match(view, /value === 'CUSTOMER_CONFIRM_PENDING'\) return '待客户确认'/)
assert.match(view, /\['READY_FOR_OUTBOUND', 'COMPLETED'\]\.includes\(value\) \? '换标完成'/)
})