优化
This commit is contained in:
@@ -16,7 +16,7 @@ test('exposes quick order as an active first-leg route with its dedicated permis
|
||||
assert.match(orderViewSource, /store\.loadDraftDetail\(id\)/)
|
||||
})
|
||||
|
||||
test('keeps the primary quick-order table limited to channel, destination, SKU and package count', () => {
|
||||
test('keeps the primary quick-order table focused on inbound code policy, channel, destination and cargo', () => {
|
||||
for (const label of ['选择渠道', '目的仓', '产品信息:产品 SKU / 箱数', '新增一行', '生成草稿单']) {
|
||||
assert.match(source, new RegExp(label))
|
||||
}
|
||||
@@ -24,6 +24,10 @@ test('keeps the primary quick-order table limited to channel, destination, SKU a
|
||||
assert.match(source, /destinationType: 'FBA'/)
|
||||
assert.match(source, /function createProduct\(\): QuickOrderProduct/)
|
||||
assert.match(source, /products: \[createProduct\(\)\]/)
|
||||
assert.match(source, /getMerchantInboundCodePolicy/)
|
||||
assert.match(source, /manualInboundCodeRequired/)
|
||||
assert.match(source, /v-if="manualInboundCodeRequired"[^>]*>旧系统入仓码/)
|
||||
assert.match(source, /inboundCode: row\.inboundCode\.trim\(\) \|\| undefined/)
|
||||
})
|
||||
|
||||
test('creates one real backend draft per order row and keeps its products together', () => {
|
||||
@@ -33,7 +37,7 @@ test('creates one real backend draft per order row and keeps its products togeth
|
||||
assert.match(source, /clientRowId: row\.id, draft: buildOrderDraft\(row, channel\)/)
|
||||
assert.match(source, /store\.saveDraftBatch\(drafts, customerName, activeBatchKey\.value\)/)
|
||||
assert.match(source, /response\.items\.flatMap/)
|
||||
assert.match(source, /item\.inboundCode\?\.trim\(\)/)
|
||||
assert.match(source, /inboundCode: item\.inboundCode\?\.trim\(\) \?\? ''/)
|
||||
assert.match(source, /已生成 \$\{successes\.length\} 张草稿单/)
|
||||
assert.match(source, /successfulIds\.has\(rows\[index\]\.id\)/)
|
||||
assert.match(source, /response\.items\.filter/)
|
||||
@@ -46,7 +50,9 @@ test('creates one real backend draft per order row and keeps its products togeth
|
||||
assert.doesNotMatch(source, /name: 'first-leg-order-create'/)
|
||||
})
|
||||
|
||||
test('requires only channel, destination, SKU and package count before directly creating drafts', () => {
|
||||
test('requires the old inbound code globally only while legacy manual mode is active', () => {
|
||||
assert.match(source, /manualInboundCodeRequired\.value[\s\S]*?rows\.findIndex\(\(row\) => !row\.inboundCode\.trim\(\)\)/)
|
||||
assert.match(source, /请填写第 \$\{missingInboundCodeIndex \+ 1\} 行的旧系统入仓码/)
|
||||
assert.match(source, /!row\.channelKey \|\| !row\.destinationWarehouseName/)
|
||||
assert.match(source, /!product\.sku\.trim\(\) \|\| product\.packageCount < 1/)
|
||||
assert.match(source, /渠道、目的仓、产品 SKU 和箱数/)
|
||||
@@ -69,7 +75,7 @@ test('requires only channel, destination, SKU and package count before directly
|
||||
|
||||
test('shows every created draft and keeps failed rows available for retry', () => {
|
||||
assert.match(source, /v-for="result in draftResults"/)
|
||||
assert.match(source, /入仓码 \{\{ result\.inboundCode \}\}/)
|
||||
assert.match(source, /入仓码将在提交订单时生成/)
|
||||
assert.match(source, /@click="editDraft\(result\)"/)
|
||||
assert.match(source, /if \(rows\.length === 0\) rows\.push\(createRow\(\)\)/)
|
||||
assert.match(source, /resultDialogOpen\.value = successes\.length > 0/)
|
||||
|
||||
Reference in New Issue
Block a user