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

Function openWorkspaceActionsMenu

tests/ui/chat/unreadIndicator.test.ts:396–421  ·  view source on GitHub ↗
(displayTitle: string)

Source from the content-addressed store, hash-verified

394 }
395
396 async function openWorkspaceActionsMenu(displayTitle: string): Promise<void> {
397 const menuButton = await waitFor(
398 () => {
399 const button = app.view.container.querySelector(
400 `button[aria-label="Workspace actions for ${displayTitle}"]`
401 ) as HTMLButtonElement | null;
402 if (!button) {
403 throw new Error(`Workspace actions button not found for ${displayTitle}`);
404 }
405 return button;
406 },
407 { timeout: 10_000 }
408 );
409
410 fireEvent.click(menuButton);
411
412 await waitFor(
413 () => {
414 const generateTitleButton = queryMenuItem("Generate new title");
415 if (!generateTitleButton) {
416 throw new Error("Workspace actions menu did not open");
417 }
418 },
419 { timeout: 10_000 }
420 );
421 }
422
423 async function createNonSelectedWorkspace(branchPrefix: string): Promise<{
424 workspaceId: string;

Callers 1

Calls 2

queryMenuItemFunction · 0.85
waitForFunction · 0.50

Tested by

no test coverage detected