fix: retain capture evidence and control failed task recovery

This commit is contained in:
abaishu0730 committed 2026-10-26 11:00:11 +08:00
1 parent c19be938fc
commit 5bae83922c
17 files changed
+333 -35

No files matched your search

+2 -2
View File
@@ -14,8 +14,8 @@ test('rule picker offers BPM-observed pairs and never offers imported unknown sc
const {page,runtime,base}=await orderDrivenUI(t,'#order-rules');const s=runtime.orderRules,record=s.get('rules','trial-notice');
record.draft.scopes=[{processName:'Excel独有流程',nodeName:'Excel独有节点'}];record.draft.processNames=['Excel独有流程'];record.draft.nodeNames=['Excel独有节点'];s.put('rules',record);
await page.getByRole('button',{name:'刷新规则与字段',exact:true}).click();await page.locator('[data-rule-id="bs-change"]').click();await page.getByRole('button',{name:'添加流程节点',exact:true}).click();
const select=page.getByRole('combobox',{name:'第2行适用流程',exact:true});await select.click();const options=page.locator('#scope-process-1-ts-dropdown');assert.doesNotMatch(await options.innerText(),/Excel独有流程/);assert.match(await options.innerText(),/备损订单更改评审/);
await options.getByText('备损订单更改评审',{exact:true}).click();await page.getByRole('combobox',{name:'第2行触发节点',exact:true}).click();assert.match(await page.locator('#scope-node-1-ts-dropdown').innerText(),/订单专员\(订单通知书\)/);
const select=page.getByRole('combobox',{name:'第2行适用流程',exact:true});await select.click();const options=page.locator('#scope-process-1-ts-dropdown');await options.getByText('备损订单更改评审',{exact:true}).waitFor();assert.doesNotMatch(await options.innerText(),/Excel独有流程/);assert.match(await options.innerText(),/备损订单更改评审/);
await options.getByText('备损订单更改评审',{exact:true}).click();await page.getByRole('combobox',{name:'第2行触发节点',exact:true}).click();await page.locator('#scope-node-1-ts-dropdown [data-selectable]').first().waitFor();assert.match(await page.locator('#scope-node-1-ts-dropdown').innerText(),/订单专员\(订单通知书\)/);
await page.getByRole('button',{name:'删除第2行',exact:true}).click();await page.getByRole('button',{name:'导入 Excel',exact:true}).click();const [download]=await Promise.all([page.waitForEvent('download'),page.getByRole('link',{name:'下载规则导入模板',exact:true}).click()]);assert.equal(download.suggestedFilename(),'规则导入模板.xlsx');
const result=await page.request.post(base+'/api/order-rules/field-mappings/catalog-settings',{headers:{Origin:base},data:{version:1,enabled:'yes'}});assert.equal(result.status(),400);
});