bore
bore copied to clipboard
allow simplified wait for multiple custom elements
We have encounter case where we need to test multiple elements in single test as you can see here https://github.com/wc-catalogue/blaze-elements/blob/master/packages/collapsible/Collapsible.test.tsx#L53
So I have got idea that we can enhance waitFor functionality by allowing array of selectors for each element we want to wait for as argument.
Something like this:
mount(
<div>
<SomeElement id="first"/>
<SomeElement id="second"/>
</div>
).waitFor(['#first', '#second'])
.then(...)
as an alternative we can also add new method(waitForAll
?) with will just use waitFor under the hood.
Let me know if you like the idea and I can try simple pull request for that.