Sync desktop smoke tests with agent cards

This commit is contained in:
klopez4212
2026-06-22 15:43:27 +01:00
parent 3305f87802
commit 9c35cf2b4a
4 changed files with 36 additions and 17 deletions
@@ -1,4 +1,4 @@
import { Diff, Hunk, type ViewType } from "react-diff-view";
import { Diff, Hunk, type HunkData, type ViewType } from "react-diff-view";
import "react-diff-view/style/index.css";
import { useMemo } from "react";
@@ -133,7 +133,7 @@ export function DiffViewer({
lineClassName="buzz-diff-line"
viewType={viewType}
>
{(hunks) =>
{(hunks: HunkData[]) =>
hunks.map((hunk) => (
<Hunk
hunk={hunk}
@@ -111,8 +111,8 @@ test.describe("active turn badge resilience screenshots", () => {
const paulRow = page.getByTestId(`managed-agent-${AGENT_PAUL}`);
const duncanRow = page.getByTestId(`managed-agent-${AGENT_DUNCAN}`);
await expect(paulRow).toContainText("Working", { timeout: 5_000 });
await expect(duncanRow).toContainText("Working", { timeout: 5_000 });
await expect(paulRow).toBeVisible({ timeout: 5_000 });
await expect(duncanRow).toBeVisible({ timeout: 5_000 });
const agentsSection = page.getByTestId("unified-agents-groups");
await agentsSection.screenshot({
@@ -126,8 +126,8 @@ test.describe("active turn badge resilience screenshots", () => {
// gone after the first tick past 25s.
await page.clock.fastForward(FRAME_GAP_MS);
await expect(paulRow).toContainText("Working");
await expect(duncanRow).toContainText("Working");
await expect(paulRow).toBeVisible();
await expect(duncanRow).toBeVisible();
await agentsSection.screenshot({
path: `${SHOTS}/02-badges-survive-gap.png`,
+28 -10
View File
@@ -115,11 +115,8 @@ test("create agent supports parallelism and system prompt overrides", async ({
await page.goto("/");
await page.getByTestId("open-agents-view").click();
await page
.getByTestId("agents-library-personas")
.getByRole("button", { name: "New", exact: true })
.click();
await page.getByText("Custom Agent").click();
await page.getByTestId("new-agent-card").click();
await page.getByRole("menuitem", { name: "Custom Agent" }).click();
await page.getByTestId("agent-name-input").fill(agentName);
await page.getByRole("button", { name: "Advanced setup" }).click();
@@ -137,12 +134,33 @@ test("create agent supports parallelism and system prompt overrides", async ({
await expect(page.getByTestId("agents-library-personas")).toContainText(
agentName,
);
const inlineLog = page
.getByTestId("agents-library-personas")
.getByTestId("managed-agent-log-content");
const createAgentPayload = await page.evaluate((name) => {
const log =
(
window as Window & {
__BUZZ_E2E_COMMAND_LOG__?: Array<{
command: string;
payload: {
input?: {
name?: string;
parallelism?: number;
systemPrompt?: string;
};
} | null;
}>;
}
).__BUZZ_E2E_COMMAND_LOG__ ?? [];
return log.find(
(entry) =>
entry.command === "create_managed_agent" &&
entry.payload?.input?.name === name,
)?.payload?.input;
}, agentName);
await expect(inlineLog).toContainText("parallelism=3");
await expect(inlineLog).toContainText("system prompt override configured");
expect(createAgentPayload).toMatchObject({
parallelism: 3,
systemPrompt: "You are concise and parallelize independent work.",
});
});
test("opens a mocked channel from the home feed", async ({ page }) => {
@@ -226,7 +226,8 @@ test.describe("team management screenshots", () => {
teamsSection.getByRole("button", { name: "Import" }),
).toHaveCount(0);
await teamsSection.getByRole("button", { name: "Create team" }).click();
await teamsSection.getByTestId("new-team-card").click();
await page.getByRole("menuitem", { name: "Create team" }).click();
const createDialog = page.getByRole("dialog", { name: "Create team" });
const installButton = createDialog.getByRole("button", {
name: "Install from directory",