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

Function findWorkspaceActionsButton

tests/ui/workspaces/subagents.test.ts:64–80  ·  view source on GitHub ↗
(params: {
  container: HTMLElement;
  title: string;
})

Source from the content-addressed store, hash-verified

62}
63
64async function findWorkspaceActionsButton(params: {
65 container: HTMLElement;
66 title: string;
67}): Promise<HTMLButtonElement> {
68 return waitFor(
69 () => {
70 const button = params.container.querySelector(
71 `button[aria-label="Workspace actions for ${params.title}"]`
72 ) as HTMLButtonElement | null;
73 if (!button) {
74 throw new Error(`Workspace actions button not found for ${params.title}`);
75 }
76 return button;
77 },
78 { timeout: 10_000 }
79 );
80}
81
82async function findMenuItem(label: string): Promise<HTMLButtonElement> {
83 return waitFor(

Callers 1

subagents.test.tsFile · 0.85

Calls 1

waitForFunction · 0.50

Tested by

no test coverage detected