This commit is contained in:
2026-09-20 15:03:31 +08:00
parent 653e79d3e7
commit c08a10a125
2 changed files with 14 additions and 4 deletions
@@ -48,6 +48,13 @@ test('exposes real list, draft, submit, and detail workflow entries without canc
assert.doesNotMatch(source, /cancelOrder|取消订单/)
})
test('returns edited submissions to the refreshed order list instead of opening detail', () => {
const submitSource = source.slice(source.indexOf('async function submitOrder()'), source.indexOf('async function searchOrders'))
assert.match(submitSource, /if \(isCreatePage\.value\)[\s\S]*router\.push\(\{ name: 'first-leg-orders' \}\)[\s\S]*return/)
assert.match(submitSource, /await loadPageData\(\)/)
assert.doesNotMatch(submitSource, /first-leg-order-detail/)
})
test('copies an order into the dedicated create page without reusing order identity', () => {
assert.match(source, /key: 'copy', label: '复制下单'/)
assert.match(source, /name: 'first-leg-order-create'[\s\S]*copyFrom: order\.id/)
@@ -478,6 +485,9 @@ test('shows field-level validation and concise guidance for required order input
assert.match(source, /prop="shipperPartySnapshot\.contactName" required/)
assert.match(source, /prop="consigneePartySnapshot\.address" required/)
assert.match(source, /:prop="`items\.\$\{index\}\.cargoNameCn`" required/)
assert.match(source, /form\.destinationType === 'FBA' \|\| form\.fulfillmentType === 'ONE_CLICK_DROPSHIP' \? '必填' : '选填'/)
assert.match(source, /SKU NO\. 和 UPC NO\. 均为选填项/)
assert.match(source, /一件代发必须填写 SKU/)
assert.match(source, /:prop="`items\.\$\{index\}\.grossWeightKg`" required/)
assert.match(source, /<span class="required-field-mark" aria-hidden="true">\*<\/span>总毛重/)
assert.match(source, /<span class="required-field-mark" aria-hidden="true">\*<\/span>总体积/)