(displayTitle: string)
| 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; |
no test coverage detected