优化
This commit is contained in:
@@ -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\)/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user