fix(workbench): hold refresh feedback

This commit is contained in:
2026-09-24 12:57:16 +08:00
parent 0a53e665eb
commit 2191efab2f
2 changed files with 28 additions and 5 deletions
@@ -271,8 +271,16 @@ test("审批动作展示中文参数和证据,viewer 不可审批,冲突后
await expect(conditionPanel.getByRole("button", { name: /预约任务/ })).toContainText("后端");
const conditionRefreshButton = conditionPanel.getByRole("button", { name: "刷新工况任务" });
await expect(conditionRefreshButton).toBeVisible();
const refreshStartedAt = Date.now();
await conditionRefreshButton.click();
await expect.poll(() => snapshotRequests).toBe(2);
const refreshingButton = conditionPanel.getByRole("button", { name: "正在刷新工况任务" });
await expect(refreshingButton).toBeDisabled();
await refreshingButton.evaluate((button: HTMLButtonElement) => button.click());
await page.waitForTimeout(500);
expect(snapshotRequests).toBe(2);
await expect(conditionRefreshButton).toBeEnabled({ timeout: 4_000 });
expect(Date.now() - refreshStartedAt).toBeGreaterThanOrEqual(2_900);
await conditionPanel.getByRole("button", { name: "配置定时流程" }).click();
await conditionPanel.getByLabel("定时流程名称").fill("夜间阀门巡检");
await conditionPanel.getByLabel("任务说明").fill("每十五分钟检查预约维修涉及的边界阀门。");