This commit is contained in:
2026-09-20 10:45:31 +08:00
parent 60e875b2c6
commit 6355529627
3 changed files with 83 additions and 3 deletions
@@ -48,6 +48,17 @@ test('exposes real list, draft, submit, and detail workflow entries without canc
assert.doesNotMatch(source, /cancelOrder|取消订单/)
})
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/)
assert.match(source, /order\.status === 'DRAFT' \? \{ copyDraft: '1' \}/)
assert.match(source, /sourceIsDraft \? await store\.loadDraftDetail\(id\) : await store\.loadDetail\(id\)/)
assert.match(source, /const draft = draftFromOrder\(order\)[\s\S]*inboundCode: ''/)
assert.match(source, /id: `copied-cargo-\$\{\+\+cargoSequence\}`/)
assert.match(source, /editingId\.value = undefined/)
assert.match(source, /订单数据已复制,请核对后提交/)
})
test('keeps create-page support errors scoped to create-page requests', () => {
assert.match(source, /if \(!isCreatePage\.value && store\.draftLoadError\)/)
})