From 3c5d77d1faaa119e3443ca91512dc682dce8509b Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 8 Oct 2026 02:51:09 -0700 Subject: [PATCH] e2e: count fused Model Information names in the user homepage spec The Protoss model cards render as .mi-name inside one full-width panel; the panel-name census now counts both render styles, keeping services.json the single source of truth. --- tests/e2e/specs/10-homepage.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/e2e/specs/10-homepage.spec.ts b/tests/e2e/specs/10-homepage.spec.ts index f9f284d..e7c124f 100644 --- a/tests/e2e/specs/10-homepage.spec.ts +++ b/tests/e2e/specs/10-homepage.spec.ts @@ -12,11 +12,15 @@ test("user homepage renders only user-category services", async ({ page }) => { const userNames = registry.filter((s) => s.category === "user").map((s) => s.name); // Panels hydrate client-side; poll the count, then compare exact sets. + // The three Protoss model cards are fused into one Model Information + // component: each model renders a `.mi-name` inside a full-width panel, + // not a standalone `.panel .name`. Count both render styles so the + // registry stays the single source of truth for the expected names. + const nameSel = "#grid .panel .name, #grid .mi-name"; await expect - .poll(() => page.locator("#grid .panel .name").count(), { timeout: 60_000 }) + .poll(() => page.locator(nameSel).count(), { timeout: 60_000 }) .toBe(userNames.length); - const names = await page.locator("#grid .panel .name").allTextContents(); - + const names = await page.locator(nameSel).allTextContents(); expect([...names].sort()).toEqual([...userNames].sort()); // RBAC tripwire: an admin-category panel in the user grid means the gate leaks. expect(names).not.toContain("Grafana");