{ const textarea = await canvas.findByRole('textbox'); await userEvent.clear(textarea); await userEvent.type(textarea, 'What is the meaning of life?'); const trigger = await canvas.findByRole('button', { name: ATTACHMENT_TOOLTIP_TEXT }); trigger.focus(); await expect(trigger).toHaveFocus(); await userEvent.tab(); await expect(trigger).not.toHaveFocus(); }} /> { const trigger = await canvas.findByRole('button', { name: ATTACHMENT_TOOLTIP_TEXT }); trigger.focus(); await userEvent.keyboard('{Enter}'); await screen.findByRole('menu'); await waitFor(() => { expect(document.activeElement).toHaveTextContent('Add files'); }); }} />