Skip to content
This repository has been archived by the owner on Feb 4, 2018. It is now read-only.

allow simplified wait for multiple custom elements #10

Open
elmariofredo opened this issue Jan 24, 2017 · 0 comments
Open

allow simplified wait for multiple custom elements #10

elmariofredo opened this issue Jan 24, 2017 · 0 comments

Comments

@elmariofredo
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant