Open
Description
The waitFor
exported by this library does not seem to be complaint with the testing-library API, where it should return the callback's return value.
In the following code, x
will have a value, but y
wouldn't:
const y = await waitFor(async () => {
const $container = await getContainer();
const x = await queries.findByRole($container, ...parameters);
console.log(x);
return x;
});
console.log(y);
We have a case where a user action opens a new tab, so we need to retry getting the page itself, not just the dom query.
Metadata
Metadata
Assignees
Labels
No labels