Use this helper function to flush (run) all your promises - wrapped in RTL's act()
A quick example of using data-testid selectors with React Testing Library.