(label: string)
| 68 | return [...container.querySelectorAll('button')].find(node => node.textContent?.trim() === label || node.getAttribute('aria-label') === label); |
| 69 | } |
| 70 | async function click(label: string): Promise<void> { |
| 71 | const node = button(label); |
| 72 | expect(node, `button ${label}`).toBeDefined(); |
| 73 | await act(async () => node!.click()); |
| 74 | } |
| 75 | async function type(id: string, value: string): Promise<void> { |
| 76 | const input = container.querySelector<HTMLInputElement>(`#${id}`)!; |
| 77 | expect(input).not.toBeNull(); |
no test coverage detected