Unify the Agent history extension with the header acrylic surface, preserve the full conversation body, and consolidate shared control and status styling. Restore map flow and SCADA controller behavior, remove obsolete rendering paths, and extend regression coverage. Button press coverage now releases outside the target so state assertions cannot accidentally toggle the control.
20 lines
773 B
TypeScript
20 lines
773 B
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
test("map notice is centered in the mobile viewport", async ({ page }) => {
|
|
await page.setViewportSize({ width: 375, height: 812 });
|
|
await page.goto("/", { waitUntil: "domcontentloaded" });
|
|
|
|
await page.getByRole("button", { name: "打开用户菜单" }).click();
|
|
await page.getByRole("menuitem", { name: /查看运行状态/ }).click();
|
|
|
|
const notice = page.locator('[role="status"]').filter({ hasText: "数据状态" }).first();
|
|
await expect(notice).toBeVisible();
|
|
|
|
const box = await notice.boundingBox();
|
|
expect(box).not.toBeNull();
|
|
|
|
const leftInset = Math.round(box!.x);
|
|
const rightInset = Math.round(375 - box!.x - box!.width);
|
|
expect(Math.abs(leftInset - rightInset)).toBeLessThanOrEqual(1);
|
|
});
|