优化
This commit is contained in:
@@ -29,7 +29,8 @@ test('exposes real list, draft, submit, and detail workflow entries without canc
|
||||
assert.match(source, /function submitOrder\(\)/)
|
||||
assert.match(source, /async function openDetail\(order: FirstLegOrder\)/)
|
||||
assert.match(source, /Promise\.allSettled\(\[/)
|
||||
assert.match(source, /Promise\.allSettled\(\[\s*store\.load\(\),\s*companyRequest/)
|
||||
assert.match(source, /const orderPageRequest = isCreatePage\.value\s*\? store\.loadWarehouseType\('DOMESTIC', true\)\s*:\s*store\.load\(\)/)
|
||||
assert.match(source, /Promise\.allSettled\(\[\s*orderPageRequest,\s*companyRequest/)
|
||||
assert.match(source, /tenantStore\.loadCompanyContext\(\)/)
|
||||
assert.match(source, /await store\.loadDetail\(order\.id\)/)
|
||||
assert.doesNotMatch(source, /cancelOrder|取消订单/)
|
||||
@@ -127,6 +128,11 @@ test('keeps desktop query actions on the first row and only shows the qualificat
|
||||
assert.doesNotMatch(source, /order-eligibility\.is-approved/)
|
||||
})
|
||||
|
||||
test('does not let order-list loading block the create form', () => {
|
||||
assert.match(source, /v-loading="isCreatePage && supportingDataLoading"/)
|
||||
assert.match(source, /const pageDataLoading = computed\(\(\) => supportingDataLoading\.value \|\| \(!isCreatePage\.value && store\.loading\)\)/)
|
||||
})
|
||||
|
||||
test('does not expose arbitrary status mutation controls to customers', () => {
|
||||
assert.doesNotMatch(source, /setStatusForPreview/)
|
||||
assert.doesNotMatch(source, /状态更新|更新状态/)
|
||||
@@ -160,6 +166,12 @@ test('selects platform destinations by type and caches private addresses per use
|
||||
assert.match(source, /私人地址不能引用平台公共仓库|form\.destinationWarehouseId = ''/)
|
||||
})
|
||||
|
||||
test('shows a recoverable destination warehouse error when list-to-create loading fails', () => {
|
||||
assert.match(source, /await router\.push\(\{ name: 'first-leg-order-create' \}\)[\s\S]*?try \{[\s\S]*?await loadDestinationWarehouses\(form\.destinationType\)/)
|
||||
assert.match(source, /supportingDataErrors\.value\.push\(message\)/)
|
||||
assert.match(source, /目的仓数据加载失败,请点击页面提示重新加载/)
|
||||
})
|
||||
|
||||
test('auto-fills trusted warehouse and company data instead of asking customers to repeat it', () => {
|
||||
assert.match(source, /async function selectDestinationWarehouse\(id: string\)/)
|
||||
assert.match(source, /await store\.loadWarehouseDetail\(warehouse\.id\)/)
|
||||
|
||||
Reference in New Issue
Block a user