Files
buzz/desktop/tests/e2e/harness-catalog-screenshots.spec.ts
cls 9dfa06ffee
Docker image / Build (linux/amd64) (push) Has been cancelled
Docker image / Build (linux/arm64) (push) Has been cancelled
Docker image / Merge release multi-arch manifest (push) Has been cancelled
Docker image / Merge debug multi-arch manifest (push) Has been cancelled
Docker image / Build public push gateway (linux/amd64) (push) Has been cancelled
Docker image / Build public push gateway (linux/arm64) (push) Has been cancelled
Docker image / Publish public push gateway image (push) Has been cancelled
Sprig image / Build (linux/amd64) (push) Has been cancelled
Sprig image / Build (linux/arm64) (push) Has been cancelled
Sprig image / Merge multi-arch manifest (push) Has been cancelled
Harbor Buzz Orchestra / Python tests and lint (push) Has been cancelled
CI / Detect Changed Paths (push) Has been cancelled
CI / Rust Lint (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Desktop Core (push) Has been cancelled
CI / Desktop Smoke E2E (1) (push) Has been cancelled
CI / Desktop Smoke E2E (2) (push) Has been cancelled
CI / Desktop Smoke E2E (3) (push) Has been cancelled
CI / Desktop Smoke E2E (4) (push) Has been cancelled
CI / Desktop (push) Has been cancelled
CI / Desktop E2E Relay (push) Has been cancelled
CI / Desktop E2E Integration (1/2) (push) Has been cancelled
CI / Desktop E2E Integration (2/2) (push) Has been cancelled
CI / Desktop E2E Integration (push) Has been cancelled
CI / Backend Integration (relay e2e) (push) Has been cancelled
CI / Relay E2E (push) Has been cancelled
CI / Web (push) Has been cancelled
CI / Mobile (push) Has been cancelled
CI / Security (push) Has been cancelled
CI / Dead Token Reference Guard (push) Has been cancelled
CI / Server Cross-Compile (aarch64-unknown-linux-musl) (push) Has been cancelled
CI / Server Cross-Compile (x86_64-unknown-linux-musl) (push) Has been cancelled
CI / Windows Rust (x86_64-pc-windows-msvc) (push) Has been cancelled
CI / Desktop Build (macOS) (push) Has been cancelled
helm chart / lint + unittest + render matrix (push) Has been cancelled
helm chart / install on kind (gated) (push) Has been cancelled
helm chart / publish chart to GHCR (push) Has been cancelled
Mesh Lifecycle / Relay-Driven Mesh Lifecycle Smoke (push) Has been cancelled
Sprig / Build (aarch64-unknown-linux-musl) (push) Has been cancelled
Sprig / Build (x86_64-unknown-linux-musl) (push) Has been cancelled
Sprig / Publish rolling release (push) Has been cancelled
Sprig / Publish tagged release (push) Has been cancelled
feat: import Chinese-localized Buzz source snapshot
Signed-off-by: cls_宁波本机 <908705107@qq.com>
2026-08-13 18:34:25 +08:00

180 lines
5.5 KiB
TypeScript

import { test, expect } from "@playwright/test";
import { installMockBridge } from "../helpers/bridge";
import { openSettings } from "../helpers/settings";
const SHOTS = "test-results/byoh-after";
/**
* AFTER screenshots for the consolidated Harnesses surface — same catalog
* fixture as byoh-before-screenshots.spec.ts so the before/after pair is a
* true apples-to-apples comparison.
*/
const CATALOG = [
{
id: "buzz-agent",
label: "Buzz Agent",
avatar_url: "",
availability: "available",
command: "buzz-agent",
binary_path: "/usr/local/bin/buzz-agent",
default_args: [],
mcp_command: "buzz-dev-mcp",
install_hint: "",
install_instructions_url: "https://github.com/block/buzz",
can_auto_install: false,
underlying_cli_path: null,
node_required: false,
auth_status: { status: "not_applicable" },
},
{
id: "claude",
label: "Claude Code",
avatar_url: "",
availability: "available",
command: "claude-agent-acp",
binary_path: "/usr/local/bin/claude-agent-acp",
default_args: [],
mcp_command: null,
install_hint: "",
install_instructions_url:
"https://github.com/agentclientprotocol/claude-agent-acp",
can_auto_install: true,
underlying_cli_path: "/usr/local/bin/claude",
node_required: false,
auth_status: { status: "logged_in" },
},
{
id: "codex",
label: "Codex",
avatar_url: "",
availability: "adapter_missing",
command: null,
binary_path: null,
default_args: [],
mcp_command: null,
install_hint: "Install the Codex ACP adapter via npm.",
install_instructions_url:
"https://github.com/agentclientprotocol/codex-acp",
can_auto_install: true,
underlying_cli_path: "/usr/local/bin/codex",
node_required: false,
auth_status: { status: "unknown" },
},
{
id: "cursor",
label: "Cursor",
avatar_url: "",
availability: "available",
command: "cursor-agent",
binary_path: "/usr/local/bin/cursor-agent",
default_args: ["acp"],
mcp_command: null,
install_hint:
"Buzz talks to Cursor through the cursor-agent CLI's ACP mode.",
install_instructions_url: "https://cursor.com/downloads",
can_auto_install: false,
underlying_cli_path: null,
node_required: false,
auth_status: { status: "not_applicable" },
source: "preset",
},
{
id: "omp",
label: "Oh My Pi",
avatar_url: "",
availability: "not_installed",
command: null,
binary_path: null,
default_args: ["acp"],
mcp_command: null,
install_hint:
"Buzz talks to Oh My Pi through its CLI's ACP mode (omp acp).",
install_instructions_url: "https://github.com/can1357/oh-my-pi",
can_auto_install: false,
underlying_cli_path: null,
node_required: false,
auth_status: { status: "not_applicable" },
source: "preset",
},
{
id: "opencode",
label: "OpenCode",
avatar_url: "",
availability: "not_installed",
command: null,
binary_path: null,
default_args: ["acp"],
mcp_command: null,
install_hint:
"Buzz talks to OpenCode through its CLI's ACP mode (opencode acp).",
install_instructions_url: "https://opencode.ai/docs",
can_auto_install: false,
underlying_cli_path: null,
node_required: false,
auth_status: { status: "not_applicable" },
source: "preset",
},
{
id: "my-custom",
label: "My Custom Harness",
avatar_url: "",
availability: "available",
command: "my-acp",
binary_path: "/usr/local/bin/my-acp",
default_args: [],
mcp_command: null,
install_hint: "",
install_instructions_url: "",
can_auto_install: false,
underlying_cli_path: null,
node_required: false,
auth_status: { status: "not_applicable" },
source: "custom",
},
];
test("after: consolidated harnesses panel + catalog dialog", async ({
page,
}) => {
test.setTimeout(60_000);
await page.setViewportSize({ width: 1280, height: 2400 });
await installMockBridge(page, { acpRuntimesCatalog: CATALOG });
await page.goto("/", { waitUntil: "domcontentloaded" });
await openSettings(page, "agents");
await expect(page.getByTestId("settings-harnesses")).toBeVisible({
timeout: 10_000,
});
await page.waitForTimeout(700);
// 1. The consolidated panel — ready rows only, no inert controls.
await page.getByTestId("settings-harnesses").screenshot({
path: `${SHOTS}/after-harnesses-panel.png`,
});
// 2. Add-harnesses catalog — needs-setup entry auto-selected in detail.
await page.getByTestId("harness-add-button").click();
await expect(page.getByTestId("harness-catalog-dialog")).toBeVisible();
await page.waitForTimeout(500);
await page.getByTestId("harness-catalog-dialog").screenshot({
path: `${SHOTS}/after-catalog-needs-setup.png`,
});
// 3. Ready entry detail (Ready state, no install action). Ready entries
// sit in the "Installed" accordion, collapsed by default — expand it.
await page.getByTestId("harness-catalog-section-installed").click();
await page.getByTestId("harness-catalog-list-item-claude").click();
await page.waitForTimeout(300);
await page.getByTestId("harness-catalog-dialog").screenshot({
path: `${SHOTS}/after-catalog-ready-detail.png`,
});
// 4. Custom harness form — all fields inline.
await page.getByTestId("harness-catalog-list-item-custom").click();
await expect(page.getByTestId("custom-harness-form")).toBeVisible();
await page.waitForTimeout(300);
await page.getByTestId("harness-catalog-dialog").screenshot({
path: `${SHOTS}/after-catalog-custom-form.png`,
});
});