feat: add project-aware agent workspace
Generic Container CI/CD / test-build-publish (push) Successful in 2m9s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 2m39s

This commit is contained in:
2026-10-22 18:52:18 +08:00
parent c6a0e74e72
commit 2d8506fea0
191 changed files with 12373 additions and 3556 deletions
+12
View File
@@ -107,13 +107,25 @@ test("spatial Artifacts switch between split, focus and peek", async ({ page })
await page.goto("/", { waitUntil: "domcontentloaded" });
await openFirstArtifact(page);
const separator = page.getByRole("separator", { name: "调整地图与报告宽度" });
const map = page.locator("#workspace-map");
await expect(separator).toHaveAttribute("data-slot", "resizable-handle");
const before = (await map.boundingBox())!.width;
await separator.focus();
await page.keyboard.press("ArrowRight");
await expect.poll(async () => (await map.boundingBox())!.width).toBeGreaterThan(before);
const resized = (await map.boundingBox())!.width;
await expect.poll(async () => (await page.locator("#artifact-workspace").boundingBox())!.width).toBeGreaterThanOrEqual(600);
await page.getByRole("button", { name: "专注分析" }).click();
await expect(page.locator("#main-workspace")).toHaveAttribute("data-layout-mode", "focus");
await expect(page.locator("#workspace-map")).toBeHidden();
await expect(separator).toBeHidden();
await page.getByRole("button", { name: "半屏显示" }).click();
await expect(page.locator("#main-workspace")).toHaveAttribute("data-layout-mode", "map_split");
await expect(page.locator("#workspace-map")).toBeVisible();
await expect.poll(async () => (await map.boundingBox())!.width).toBeCloseTo(resized, 0);
await page.getByRole("button", { name: "将成果收起为预览" }).click();
await expect(page.locator("#main-workspace")).toHaveAttribute("data-layout-mode", "default");