feat: complete workflow recovery and safe administration

This commit is contained in:
abaishu0730 committed 2026-10-21 12:30:11 +08:00
1 parent 1148aa6f14
commit 69583e8c33
46 files changed
+756 -120

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ test('scan API enforces owner, role and origin; scan results and overview reflec
test('ledger browser keeps filtering, details and addressable PDF navigation independent from scanner failures',async t=>{
const {base,scanner,scanStore}=await setup(t);await scanner.scan('fixture',{user:{username:'admin',role:'admin'},sessionId:'fixture'});
const browser=await loadPlaywright().chromium.launch(browserOptions());t.after(()=>browser.close());const page=await browser.newPage();await page.goto(base+'/#records');await page.locator('#username').fill('admin');await page.locator('#password').fill('Test-password-123');await page.locator('#login-form button').click();
await page.locator('[data-arrival-row]').first().waitFor();assert.equal(await page.locator('[data-arrival-row]').count(),2);assert.equal(await page.getByRole('navigation',{name:'记录导航'}).getByRole('link',{name:'流程到达记录',exact:true}).getAttribute('aria-current'),'page');
await page.locator('[data-arrival-row]').first().waitFor();assert.equal(await page.locator('[data-arrival-row]').count(),2);assert.equal(await page.getByRole('navigation',{name:'工具导航'}).getByRole('link',{name:'流程到达记录',exact:true}).getAttribute('aria-current'),'page');
await page.getByRole('button',{name:'查看详情',exact:true}).first().click();await page.getByRole('dialog',{name:'流程到达详情'}).waitFor();await page.getByRole('dialog').getByText('订单号:123',{exact:true}).waitFor();await page.getByRole('button',{name:'关闭详情',exact:true}).click();
const background=normalizeArrival({taskId:'background',serialNum:'BG-1',processName:'海外运营订单评审',startTime:'2026-10-16T12:00:00',processInstanceSubject:'后台扫描新增'},'portal-v8');scanStore.complete(scanStore.begin('fixture','系统扫描'),'fixture',[background]);
await page.getByText('记录有更新。',{exact:true}).waitFor({timeout:20000});await page.locator('.card-header').getByRole('button',{name:'刷新记录',exact:true}).click();await page.getByText('后台扫描新增',{exact:true}).filter({visible:true}).waitFor();await page.getByLabel('搜索流程记录',{exact:true}).fill('昨天');await page.getByRole('button',{name:'查询',exact:true}).click();await page.waitForFunction(()=>document.querySelectorAll('[data-arrival-row]').length===1);await page.getByText('昨天的流程',{exact:true}).filter({visible:true}).waitFor();