优化
This commit is contained in:
@@ -27,21 +27,51 @@ test('客户贴标表单不展示客户单号、托盘和内部库存来源列',
|
||||
|
||||
test('贴标申请保留关联模板下载和上传入口', () => {
|
||||
assert.match(view, /downloadRelabelTemplate/)
|
||||
assert.match(view, /下载\{\{ labelingMode === 'carton' \? '箱唛' : 'SKU' \}\}模板/)
|
||||
assert.match(view, /templateInput\?\.click\(\)/)
|
||||
assert.match(view, /上传\{\{ labelingMode === 'carton' \? '箱唛' : 'SKU' \}\}模板/)
|
||||
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, /skuTemplateInput\?\.click\(\)/)
|
||||
assert.match(view, /cartonTemplateInput\?\.click\(\)/)
|
||||
assert.match(view, /importRelabelTemplate/)
|
||||
assert.match(view, /明细行标识/)
|
||||
assert.match(view, /'明细行标识', '旧箱唛', '旧SKU标签', '新SKU标签'/)
|
||||
assert.match(view, /'旧箱唛', '新FBA箱唛', 'FBA目的仓'/)
|
||||
assert.match(view, /SKU 与箱号关联通过旧箱唛合并/)
|
||||
assert.doesNotMatch(view, /库存位置ID/)
|
||||
})
|
||||
|
||||
test('贴标货物明细支持手动添加和编辑', () => {
|
||||
assert.match(view, /手动添加行/)
|
||||
assert.match(view, /addRelabelCargoRow/)
|
||||
assert.match(view, /货物明细已按所选入仓单的可用库存带出/)
|
||||
assert.match(view, /所选入仓单没有更多可添加的库存箱/)
|
||||
assert.match(view, /<el-input v-model="row\.sku" :readonly="props\.service === 'disposal'"/)
|
||||
})
|
||||
|
||||
test('上传关系支持部分或全量选择后导入本次换标明细', () => {
|
||||
assert.match(view, /interface ImportedRelabelBinding/)
|
||||
assert.match(view, /待导入绑定关系/)
|
||||
assert.match(view, /全选/)
|
||||
assert.match(view, /导入到明细/)
|
||||
assert.match(view, /importSelectedBindingsToDetails/)
|
||||
assert.match(view, /item\.selected/)
|
||||
assert.match(view, /cartonDetailRows/)
|
||||
assert.match(view, /included: false/)
|
||||
assert.match(view, /cargoRows\.value\[0\]\.included = true/)
|
||||
})
|
||||
|
||||
test('箱唛换标一行固定代表一箱', () => {
|
||||
const cartonTable = view.match(/<div v-if="labelingMode === 'carton'" class="warehouse-table-scroll">.+?(?=<div v-else class="warehouse-table-scroll">)/s)?.[0]
|
||||
assert.ok(cartonTable)
|
||||
assert.match(cartonTable, /<th>箱数<\/th>/)
|
||||
assert.match(cartonTable, /<td><strong>1 箱<\/strong><\/td>/)
|
||||
assert.doesNotMatch(cartonTable, /v-model="row\.quantity"/)
|
||||
assert.doesNotMatch(view, /'本次箱数'/)
|
||||
assert.match(view, /totalPackageCount: 1, notifiedPackageCount: 1/)
|
||||
})
|
||||
|
||||
test('贴标货物明细通过单一换标类型选择三种模式', () => {
|
||||
assert.match(view, /<el-radio-group v-model="labelingMode" aria-label="换标类型">/)
|
||||
assert.match(view, /<el-radio-button value="carton">只换箱唛<\/el-radio-button>/)
|
||||
@@ -49,12 +79,14 @@ test('贴标货物明细通过单一换标类型选择三种模式', () => {
|
||||
assert.match(view, /<el-radio-button value="carton_and_sku">SKU 和箱唛都换<\/el-radio-button>/)
|
||||
assert.doesNotMatch(view, /el-tab-pane label="(?:箱唛换标|SKU 换标)"/)
|
||||
assert.match(view, /interface SkuRelabelRow/)
|
||||
assert.match(view, /原 SKU \*/)
|
||||
assert.match(view, /我方箱唛 \*/)
|
||||
assert.match(view, /旧 SKU \*/)
|
||||
assert.match(view, /旧箱唛 \*/)
|
||||
assert.match(view, /换标数量(件)\*/)
|
||||
assert.match(view, /旧SKU标签/)
|
||||
assert.match(view, /新SKU标签/)
|
||||
assert.match(view, /已导入 \$\{rows\.length\} 条 SKU 换标明细/)
|
||||
assert.match(view, /已读取 \$\{rows\.length\} 条绑定关系/)
|
||||
assert.match(view, /applyExistingSkuBinding/)
|
||||
assert.match(view, /applyExistingCartonBinding/)
|
||||
assert.match(view, /buildSkuRelabelItems/)
|
||||
assert.match(view, /CARTON_AND_SKU/)
|
||||
assert.match(view, /changeCarton/)
|
||||
|
||||
Reference in New Issue
Block a user