bore icon indicating copy to clipboard operation
bore copied to clipboard

allow simplified wait for multiple custom elements

Open devopsmariocom opened this issue 8 years ago • 0 comments

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.

devopsmariocom avatar Jan 24 '17 14:01 devopsmariocom