diff --git a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs index 4f17b40..e973b3c 100644 --- a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs +++ b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs @@ -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, /