Open
Description
So, I added this feature:
- await waitForElementToBeRemoved(() => screen.getByText('foo'))
+ const element = screen.getByText('foo')
+ await waitForElementToBeRemoved(element)
Both work, but the first I think is easier most of the time.
But I just learned that in React applications (and likely other frameworks) the DOM nodes aren't always removed, rather they're updated. So, that cool new feature won't always work as you might expect. I think we should probably document this somewhere.