feat: expand intelligent investigation workspace
Generic Container CI/CD / test-build-publish (push) Successful in 1m52s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 1m52s

This commit is contained in:
2026-10-30 17:30:19 +08:00
parent ddd03dbff6
commit c0e4231b83
223 changed files with 13155 additions and 5304 deletions
+18 -1
View File
@@ -1,7 +1,9 @@
import { expect, test, type Page } from "@playwright/test";
import { mockAgentApi } from "./support/mock-agent-api";
import { mockWorkbenchContext } from "./support/mock-workbench-context";
test.beforeEach(async ({ page }) => {
await mockWorkbenchContext(page);
await mockAgentApi(page);
});
@@ -10,7 +12,7 @@ async function openAgentPanel(page: Page) {
await expect(page.getByRole("complementary", { name: "Agent 命令面板" })).toBeVisible();
}
test("speech capability detection preserves the server hydration tree", async ({ page }) => {
test("speech capability detection preserves the server hydration tree", async ({ page }, testInfo) => {
const hydrationErrors: string[] = [];
page.on("console", (message) => {
@@ -31,6 +33,21 @@ test("speech capability detection preserves the server hydration tree", async ({
await expect(page.getByRole("button", { name: "语音输入" })).toBeVisible();
await expect(page.getByRole("button", { name: "权限批准模式" })).toBeVisible();
expect(hydrationErrors).toEqual([]);
const form = page.locator("form.agent-panel-input-form");
await form.screenshot({ path: testInfo.outputPath("composer-idle.png"), animations: "disabled" });
await form.getByRole("textbox").fill("检查城南压力");
await form.screenshot({ path: testInfo.outputPath("composer-ready.png"), animations: "disabled" });
const voice = form.getByRole("button", { name: "语音输入", exact: true });
await voice.hover();
await expect(voice).toHaveCSS("border-radius", "50%");
await form.screenshot({ path: testInfo.outputPath("composer-voice-hover.png"), animations: "disabled" });
await page.setViewportSize({ width: 375, height: 900 });
const mobilePanel = page.getByRole("complementary", { name: "Agent 命令面板" });
if (!await mobilePanel.isVisible()) await page.getByRole("button", { name: "打开 Agent 面板", exact: true }).click();
const mobileVoice = mobilePanel.getByRole("button", { name: "语音输入", exact: true });
await mobileVoice.hover();
await expect(mobileVoice).toHaveCSS("border-radius", "50%");
await mobilePanel.locator("form").screenshot({ path: testInfo.outputPath("composer-voice-hover-narrow.png"), animations: "disabled" });
});
test("speech recognition failure clears the active animation and explains the error", async ({ page }) => {