import { describe, it, expect } from "vitest"; import { render, screen } from "@testing-library/react"; import { SelectionOverlay } from "./selection-overlay"; describe("SelectionOverlay", () => { it("renders nothing when rect is null (no selection)", () => { render(); expect(screen.queryByTestId("selection-overlay")).not.toBeInTheDocument(); }); it("positions the ring from the agent-reported rect", () => { render( , ); const overlay = screen.getByTestId("selection-overlay"); expect(overlay).toHaveStyle({ position: "absolute", left: "24px", top: "12px", width: "320px", height: "48px", }); }); it("is chrome, not content: hidden from a11y and inert to pointers (ADR-028)", () => { render(); const overlay = screen.getByTestId("selection-overlay"); expect(overlay).toHaveAttribute("aria-hidden", "true"); expect(overlay).toHaveStyle({ pointerEvents: "none" }); }); });