fix: expose observed historical processes in matching catalog
This commit is contained in:
1 parent
b17b975812
commit
c3e948d2e4
12 files changed
+147
-20
No files matched your search
@@ -1,6 +1,14 @@
|
||||
'use strict';
|
||||
const test=require('node:test'),assert=require('node:assert/strict');
|
||||
const {orderDrivenUI}=require('../fixtures/order-driven-ui.cjs');
|
||||
test('field mapping lists and searches known historical processes with nodes pending collection',{timeout:60000},async t=>{
|
||||
const {page,runtime}=await orderDrivenUI(t),s=runtime.orderRules,before=s.all('rules');
|
||||
require('../../src/modules/order-rules/scope-catalog.cjs').observe(s,[{source:'history',processName:'历史可信流程',nodeName:'历史查看'}]);
|
||||
await page.getByRole('button',{name:'刷新目录',exact:true}).click();await page.getByRole('cell',{name:'历史可信流程',exact:true}).waitFor();
|
||||
assert.match(await page.locator('#fm-count').textContent(),/2 个流程 · 1 个流程节点配对/);assert.match(await page.locator('#fm-rows').textContent(),/节点待采集/);assert.doesNotMatch(await page.locator('#fm-rows').textContent(),/历史查看/);
|
||||
await page.locator('#fm-search').fill('历史可信');assert.equal(await page.locator('#fm-rows tr').count(),1);assert.equal(await page.getByRole('cell',{name:'历史可信流程',exact:true}).count(),1);
|
||||
await page.locator('#fm-search').fill('订单专员');assert.equal(await page.getByRole('cell',{name:'历史可信流程',exact:true}).count(),0);assert.equal(await page.getByRole('cell',{name:'备损订单更改评审',exact:true}).count(),1);assert.deepEqual(s.all('rules'),before);
|
||||
});
|
||||
test('field mapping page shows only persisted processes/nodes and toggles collection without editing rules',{timeout:60000},async t=>{
|
||||
const {page,runtime}=await orderDrivenUI(t);const before=runtime.orderRules.all('rules');
|
||||
await page.getByRole('switch',{name:'自动采集流程和节点',exact:true}).waitFor();
|
||||
|
||||
Reference in new issue
Block a user