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

Function getWorkspaceTitleElement

tests/ui/chat/unreadIndicator.test.ts:469–482  ·  view source on GitHub ↗
(
      workspaceId: string,
      displayTitle: string
    )

Source from the content-addressed store, hash-verified

467 }
468
469 function getWorkspaceTitleElement(
470 workspaceId: string,
471 displayTitle: string
472 ): HTMLSpanElement | null {
473 const workspaceRow = app.view.container.querySelector(
474 `[data-workspace-id="${workspaceId}"]`
475 ) as HTMLElement | null;
476 if (!workspaceRow) {
477 return null;
478 }
479
480 const textSpans = Array.from(workspaceRow.querySelectorAll("span")) as HTMLSpanElement[];
481 return textSpans.find((span) => span.textContent?.trim() === displayTitle) ?? null;
482 }
483
484 beforeEach(async () => {
485 app = await createAppHarness({ branchPrefix: "unread-manual" });

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected