(element: HTMLElement | null)
| 136 | const allByTestId = (id: string): HTMLElement[] => [...container.querySelectorAll<HTMLElement>(`[data-testid="${id}"]`)]; |
| 137 | |
| 138 | async function click(element: HTMLElement | null): Promise<void> { |
| 139 | expect(element, 'the control must exist').not.toBeNull(); |
| 140 | await act(async () => { |
| 141 | element?.click(); |
| 142 | }); |
| 143 | await settle(); |
| 144 | } |
| 145 | |
| 146 | async function type(element: HTMLElement | null, value: string): Promise<void> { |
| 147 | expect(element, 'the field must exist').not.toBeNull(); |
no test coverage detected