{ const canvas = within(canvasElement); await userEvent.type( canvas.getByPlaceholderText(/add to the discussion/i), "This will fail{Control>}{Enter}{/Control}" ); await waitFor(() => expect(canvas.getByRole("alert")).toHaveTextContent(/network request failed/i) ); }} />