MCPcopy
hub / github.com/coder/mux / getWorkspaceElement

Function getWorkspaceElement

tests/ui/workspaces/intermediateStatus.test.ts:17–25  ·  view source on GitHub ↗
(container: HTMLElement, workspaceId: string)

Source from the content-addressed store, hash-verified

15import { workspaceStore } from "@/browser/stores/WorkspaceStore";
16
17function getWorkspaceElement(container: HTMLElement, workspaceId: string): HTMLElement {
18 const el = container.querySelector(
19 `[role="button"][data-workspace-id="${workspaceId}"]`
20 ) as HTMLElement | null;
21 if (!el) {
22 throw new Error(`Workspace element not found for ${workspaceId}`);
23 }
24 return el;
25}
26
27describe("Workspace intermediate status (mock AI router)", () => {
28 beforeAll(async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected