style(workbench): refine notification cards and hit targets
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user