style(workbench): refine notification cards and hit targets

This commit is contained in:
2026-11-07 20:04:28 +08:00
parent ea3b62573c
commit e0436217a8
3 changed files with 64 additions and 36 deletions
+6 -1
View File
@@ -93,7 +93,12 @@ for (const width of [1280, 375, 320]) {
await expect(page.getByRole("region", { name: "工况任务", exact: true }).getByRole("heading", { name: task.title })).toBeVisible();
await expect(popup).toBeVisible();
await menu.click();
await page.getByRole("menuitem", { name: `打开通知:${alert.title}` }).click();
const alertRow = page.locator(`[data-alert-id="${alert.id}"]`);
const titleBox = await alertRow.locator("p").first().boundingBox();
const rowBox = await alertRow.boundingBox();
await alertRow.click({ position: { x: titleBox!.x - rowBox!.x + titleBox!.width / 2,
y: titleBox!.y - rowBox!.y + titleBox!.height / 2 } });
await expect(page.getByRole("menu")).toHaveCount(0);
await expect(page.getByRole("region", { name: "工况任务", exact: true }).getByRole("heading", { name: task.title })).toBeVisible();
await emit();
await expect(popup).toBeVisible();