diff --git a/packages/app/e2e/session/titlebar-right-rail-contract.spec.ts b/packages/app/e2e/session/titlebar-right-rail-contract.spec.ts index 041c1a648..53f0357c9 100644 --- a/packages/app/e2e/session/titlebar-right-rail-contract.spec.ts +++ b/packages/app/e2e/session/titlebar-right-rail-contract.spec.ts @@ -20,6 +20,53 @@ import { modKey } from "../utils" // selection overlay, 4pt grid pinning) test.describe("titlebar right rail contract", () => { + test("expanded titlebar toggles change icon shape without selected-chip background", async ({ + page, + gotoSession, + }) => { + await gotoSession() + + const sidebarToggle = page.locator('[data-action="pawwork-sidebar-toggle"]') + const rightPanelToggle = page.getByRole("button", { name: "Right utility panel" }) + if ((await sidebarToggle.getAttribute("aria-expanded")) !== "true") { + await sidebarToggle.click() + } + await expect(sidebarToggle).toHaveAttribute("aria-expanded", "true") + await openRightPanel(page) + await expect(rightPanelToggle).toHaveAttribute("aria-expanded", "true") + await page.mouse.move(400, 200) + + const backgroundAlpha = (selector: string) => + page.evaluate((target) => { + const el = document.querySelector(target) + if (!el) return null + const bg = getComputedStyle(el).backgroundColor + const rgba = bg.match(/^rgba\((.+)\)$/) + if (!rgba) return bg.startsWith("rgb(") ? 1 : null + const parts = rgba[1].split(",").map((part) => part.trim()) + return Number(parts[3]) + }, selector) + + await expect + .poll( + async () => ({ + sidebar: await backgroundAlpha('[data-action="pawwork-sidebar-toggle"]'), + rightPanel: await backgroundAlpha('button[aria-label="Right utility panel"]'), + }), + { timeout: 2_000 }, + ) + .toEqual({ + sidebar: 0, + rightPanel: 0, + }) + + await sidebarToggle.hover() + await expect.poll(() => backgroundAlpha('[data-action="pawwork-sidebar-toggle"]')).toBeGreaterThan(0) + + await rightPanelToggle.hover() + await expect.poll(() => backgroundAlpha('button[aria-label="Right utility panel"]')).toBeGreaterThan(0) + }) + test("right utility toggle stays clickable with the full tab set open", async ({ page, gotoSession, diff --git a/packages/app/e2e/status/status-popover.spec.ts b/packages/app/e2e/status/status-popover.spec.ts index bfa9abf44..003ad8ae2 100644 --- a/packages/app/e2e/status/status-popover.spec.ts +++ b/packages/app/e2e/status/status-popover.spec.ts @@ -18,10 +18,10 @@ test("desktop right-panel toggle opens the status tab by default", async ({ page // Servers/MCP/LSP/Plugins render as collapsible SectionRow `