diff --git a/packages/web/src/components/GraphSelector.tsx b/packages/web/src/components/GraphSelector.tsx index eb729aac..81cadfbe 100644 --- a/packages/web/src/components/GraphSelector.tsx +++ b/packages/web/src/components/GraphSelector.tsx @@ -10,9 +10,13 @@ interface GraphSelectorProps { onCreateGraph?: () => void; onEditGraph?: (graph: any) => void; onDeleteGraph?: (graph: any) => void; + // GraphSelector is mounted in 2–3 responsive slots at once (sidebar, phone + // top-bar, workspace top-bar); each needs a distinct test id so selectors stay + // unique. Defaults to the canonical 'graph-selector' (the workspace mount). + testId?: string; } -export function GraphSelector({ onCreateGraph, onEditGraph, onDeleteGraph }: GraphSelectorProps) { +export function GraphSelector({ onCreateGraph, onEditGraph, onDeleteGraph, testId = 'graph-selector' }: GraphSelectorProps) { const { currentGraph, graphHierarchy, selectGraph } = useGraph(); const { currentTeam, currentUser } = useAuth(); const [isOpen, setIsOpen] = useState(false); @@ -229,7 +233,7 @@ export function GraphSelector({ onCreateGraph, onEditGraph, onDeleteGraph }: Gra