(params: {
container: HTMLElement;
title: string;
})
| 62 | } |
| 63 | |
| 64 | async 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 | |
| 82 | async function findMenuItem(label: string): Promise<HTMLButtonElement> { |
| 83 | return waitFor( |
no test coverage detected