Allow hiding agent harness options

Signed-off-by: kenny lopez <klopez4212@gmail.com>
This commit is contained in:
kenny lopez
2026-07-27 13:24:50 +01:00
parent 7fc0cc82db
commit f07dfcfd91
8 changed files with 319 additions and 24 deletions
+44 -4
View File
@@ -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,
);