(container: HTMLElement)
| 21 | } |
| 22 | |
| 23 | async function openAnalyticsAndGetHeader(container: HTMLElement) { |
| 24 | const analyticsButton = container.querySelector( |
| 25 | '[data-testid="analytics-button"]' |
| 26 | ) as HTMLButtonElement; |
| 27 | expect(analyticsButton).not.toBeNull(); |
| 28 | fireEvent.click(analyticsButton); |
| 29 | |
| 30 | let header: HTMLElement | null = null; |
| 31 | await waitFor( |
| 32 | () => { |
| 33 | header = container.querySelector('[data-testid="analytics-header"]') as HTMLElement; |
| 34 | if (!header) { |
| 35 | throw new Error("Analytics header not found"); |
| 36 | } |
| 37 | }, |
| 38 | { timeout: 10_000 } |
| 39 | ); |
| 40 | |
| 41 | return header!; |
| 42 | } |
| 43 | |
| 44 | describe("Analytics header titlebar contract", () => { |
| 45 | beforeAll(async () => { |
no test coverage detected