fix(workbench): reuse system reconnect notice

This commit is contained in:
2026-09-24 14:52:56 +08:00
parent 2191efab2f
commit db778e0bac
2 changed files with 31 additions and 9 deletions
@@ -264,6 +264,17 @@ test("审批动作展示中文参数和证据,viewer 不可审批,冲突后
};
await page.goto("/");
const reconnectNotice = page.locator("[data-sonner-toast]").filter({
hasText: "业务同步正在重连"
});
await expect(reconnectNotice).toBeVisible();
await expect(reconnectNotice).toContainText("当前数据可能陈旧,连接恢复后将自动更新。");
await expect(page.getByText("正在重连,业务数据可能陈旧", { exact: true })).toHaveCount(0);
await page.evaluate(() => document.fonts.ready);
await testInfo.attach("workbench-reconnect-notice", {
body: await reconnectNotice.screenshot({ path: testInfo.outputPath("workbench-reconnect-notice.png") }),
contentType: "image/png"
});
let conditionPanel = await openTask();
await expect(conditionPanel.getByRole("navigation", { name: "工况任务分类" })).toBeVisible();
await expect(conditionPanel.getByRole("button", { name: /定时任务/ })).toContainText("模拟数据");