feat(workbench): add manual task refresh

This commit is contained in:
2026-09-24 12:45:43 +08:00
parent ddf953b641
commit 0a53e665eb
5 changed files with 84 additions and 5 deletions
@@ -125,6 +125,31 @@ test.describe("mobile workbench sheet", () => {
await expect(page.getByRole("button", { name: "打开工况任务" })).toBeVisible();
});
test("keeps refresh to the right of schedule on a 320px viewport", async ({ page }) => {
await page.setViewportSize({ width: 320, height: 700 });
await page.goto("/", { waitUntil: "domcontentloaded" });
await page.getByRole("button", { name: "打开工况任务" }).click();
const sheet = page.getByRole("region", { name: "工况任务抽屉" });
const scheduleButton = sheet.getByRole("button", { name: "配置定时流程" });
const refreshButton = sheet.getByRole("button", { name: "刷新工况任务" });
await expect(scheduleButton).toBeVisible();
await expect(refreshButton).toBeVisible();
const [sheetBox, scheduleBox, refreshBox] = await Promise.all([
sheet.boundingBox(),
scheduleButton.boundingBox(),
refreshButton.boundingBox()
]);
expect(sheetBox).not.toBeNull();
expect(scheduleBox).not.toBeNull();
expect(refreshBox).not.toBeNull();
expect(refreshBox!.x).toBeGreaterThan(scheduleBox!.x);
expect(refreshBox!.x + refreshBox!.width).toBeLessThanOrEqual(
sheetBox!.x + sheetBox!.width
);
});
test("keeps condition detail expanded inside the mobile sheet", async ({ page }) => {
await page.goto("/", { waitUntil: "domcontentloaded" });
await page.getByRole("button", { name: "打开工况任务" }).click();