feat: refine workbench visuals and map controls
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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { expect, test } from "playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test.describe("mobile workbench sheet", () => {
|
||||
test.use({ viewport: { width: 390, height: 844 } });
|
||||
@@ -34,6 +34,8 @@ test.describe("mobile workbench sheet", () => {
|
||||
|
||||
await expect(sheet).toBeVisible();
|
||||
await expect(closeButton).toHaveCount(1);
|
||||
await expect(closeButton).toHaveClass(/agent-panel-icon-button/);
|
||||
await expect(closeButton).toHaveCSS("border-radius", "12px");
|
||||
await expect.poll(async () => Math.round((await closeButton.boundingBox())?.height ?? 0)).toBe(
|
||||
40
|
||||
);
|
||||
@@ -55,8 +57,8 @@ test.describe("mobile workbench sheet", () => {
|
||||
})
|
||||
)
|
||||
.toEqual({
|
||||
backdropFilter: "blur(24px) saturate(1.08)",
|
||||
nestedFilterCount: 0,
|
||||
backdropFilter: "blur(18px) saturate(1.08)",
|
||||
nestedFilterCount: 1,
|
||||
opacity: "1",
|
||||
transform: "none"
|
||||
});
|
||||
@@ -113,8 +115,11 @@ test.describe("mobile workbench sheet", () => {
|
||||
await page.getByRole("button", { name: "打开工况任务" }).click();
|
||||
|
||||
const sheet = page.getByRole("region", { name: "工况任务抽屉" });
|
||||
const closeButton = page.getByRole("button", { name: "关闭工况任务" });
|
||||
await expect(sheet).toBeVisible();
|
||||
await page.getByRole("button", { name: "关闭工况任务" }).click();
|
||||
await expect(closeButton).toHaveClass(/agent-panel-icon-button/);
|
||||
await expect(closeButton).toHaveCSS("border-radius", "12px");
|
||||
await closeButton.click();
|
||||
expect(await sheet.count()).toBe(0);
|
||||
await expect(page.getByRole("button", { name: "打开工况任务" })).toBeVisible();
|
||||
});
|
||||
@@ -126,6 +131,9 @@ test.describe("mobile workbench sheet", () => {
|
||||
|
||||
await sheet.getByRole("button", { name: /SCADA 数据诊断/ }).first().click();
|
||||
await expect(sheet.getByRole("button", { name: "收起工况任务" })).toBeVisible();
|
||||
const workflowTitle = sheet.getByText("SCADA 诊断流程", { exact: true });
|
||||
await expect(workflowTitle).toBeVisible();
|
||||
await expect(workflowTitle.locator("..").locator("svg")).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("keeps the waiting-for-reply state readable in the narrow sheet", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user