feat(workbench): expand SCADA monitoring and investigation presentation

This commit is contained in:
2026-11-07 19:50:14 +08:00
parent 0801e161ec
commit ba71e2d529
133 changed files with 6754 additions and 1438 deletions
+13 -5
View File
@@ -254,7 +254,15 @@ for (const input of ["pointer", "keyboard"] as const) {
});
const trigger = dialog.getByRole("combobox");
await expect(trigger).toBeFocused();
const focusedBorder = await trigger.evaluate((element) => getComputedStyle(element).borderTopColor);
const focusedBorder = await trigger.evaluate(async (element) => {
// Flush focus styles before finding the CSS transition; focus can be set
// while the border is still interpolating toward its final theme color.
getComputedStyle(element).borderTopColor;
await Promise.all(element.getAnimations().filter((animation) =>
animation instanceof CSSTransition && animation.transitionProperty === "border-top-color"
).map((animation) => animation.finished));
return getComputedStyle(element).borderTopColor;
});
if (input === "keyboard") {
await trigger.press("ArrowDown");
await page.getByRole("option").filter({ has: page.getByText("凤阳(新版)", { exact: true }) }).focus();
@@ -289,8 +297,8 @@ test("place search follows project configuration after switching", async ({ page
await chooseProject(page, "凤阳(新版)");
await dialog.getByRole("button", { name: "进入项目", exact: true }).click();
await expect(dialog).toBeHidden();
await page.getByRole("button", { name: "地址定位:查询地址并定位到地图" }).click();
const panel = page.getByRole("region", { name: "地址定位", exact: true });
await page.getByRole("button", { name: "定位:查询地址或管网要素" }).click();
const panel = page.getByRole("region", { name: "定位", exact: true });
await expect(panel).toContainText("凤阳县 · 天地图地名搜索");
await expect(panel).not.toContainText("奉贤区");
await panel.getByLabel("查询地址").fill("府城镇");
@@ -304,8 +312,8 @@ test("place search follows project configuration after switching", async ({ page
test("unconfigured project disables place search", async ({ page }) => {
await prepare(page, false, false);
await page.goto("/", { waitUntil: "domcontentloaded" });
await page.getByRole("button", { name: "地址定位:查询地址并定位到地图" }).click();
const panel = page.getByRole("region", { name: "地址定位", exact: true });
await page.getByRole("button", { name: "定位:查询地址或管网要素" }).click();
const panel = page.getByRole("region", { name: "定位", exact: true });
await expect(panel).toContainText("当前项目暂未配置地名搜索");
await expect(panel.getByRole("button", { name: "搜索地名" })).toBeDisabled();
});