mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Allow hiding agent harness options
Signed-off-by: kenny lopez <klopez4212@gmail.com>
This commit is contained in:
@@ -208,9 +208,7 @@ test.describe("Doctor panel state screenshots", () => {
|
||||
});
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(page.getByTestId("doctor-runtime-toggle-goose")).toBeChecked();
|
||||
await expect(
|
||||
page.getByTestId("doctor-runtime-toggle-goose"),
|
||||
).toBeDisabled();
|
||||
await expect(page.getByTestId("doctor-runtime-toggle-goose")).toBeEnabled();
|
||||
await expect(page.getByTestId("doctor-runtime-codex")).not.toContainText(
|
||||
"Not installed",
|
||||
);
|
||||
@@ -233,6 +231,48 @@ test.describe("Doctor panel state screenshots", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("available runtimes can be hidden from agent harness menus", async ({
|
||||
page,
|
||||
}) => {
|
||||
await installMockBridge(page, {
|
||||
acpRuntimesCatalog: [
|
||||
GOOSE_AVAILABLE,
|
||||
CLAUDE_AVAILABLE_LOGGED_IN,
|
||||
BUZZ_AGENT_AVAILABLE,
|
||||
],
|
||||
});
|
||||
|
||||
await page.goto("/", { waitUntil: "domcontentloaded" });
|
||||
await openSettings(page, "agents");
|
||||
|
||||
const gooseToggle = page.getByTestId("doctor-runtime-toggle-goose");
|
||||
await expect(gooseToggle).toBeChecked();
|
||||
await expect(gooseToggle).toBeEnabled();
|
||||
await gooseToggle.click();
|
||||
await expect(gooseToggle).not.toBeChecked();
|
||||
|
||||
await page.getByRole("button", { name: "Back to app" }).click();
|
||||
await page.getByTestId("open-agents-view").click();
|
||||
await page.getByTestId("new-agent-card").click();
|
||||
await page.getByRole("menuitem", { name: "Create from scratch" }).click();
|
||||
|
||||
const harnessDropdown = page.locator("#persona-runtime");
|
||||
await expect(harnessDropdown).toContainText("Buzz Agent");
|
||||
await harnessDropdown.press("Enter");
|
||||
await expect(
|
||||
page.getByRole("menuitemradio", { name: /^Goose/ }),
|
||||
).toHaveCount(0);
|
||||
await expect(
|
||||
page.getByRole("menuitemradio", { name: /^Buzz Agent/ }),
|
||||
).toBeVisible();
|
||||
|
||||
await page.reload({ waitUntil: "domcontentloaded" });
|
||||
await openSettings(page, "agents");
|
||||
await expect(
|
||||
page.getByTestId("doctor-runtime-toggle-goose"),
|
||||
).not.toBeChecked();
|
||||
});
|
||||
|
||||
/** 01 — a ready runtime stays compact without redundant status copy. */
|
||||
test("01-auth-logged-in", async ({ page }) => {
|
||||
await installMockBridge(page, {
|
||||
@@ -560,7 +600,7 @@ test.describe("Doctor panel state screenshots", () => {
|
||||
await expect(toggle).toBeEnabled();
|
||||
await toggle.click();
|
||||
await expect(toggle).toBeChecked({ timeout: 5_000 });
|
||||
await expect(toggle).toBeDisabled();
|
||||
await expect(toggle).toBeEnabled();
|
||||
await expect(page.getByTestId("doctor-runtime-guidance-codex")).toHaveCount(
|
||||
0,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user