passsy / spot

Chainable powerful Flutter widget selector API, screenshots and assertions for awesome widget tests.
https://pub.dev/packages/spot
Apache License 2.0
63 stars 2 forks source link

Do not throw when the child selector quantity constratins don't match #22

Closed passsy closed 1 year ago

passsy commented 1 year ago

This query would fail when the entire widget tree contains two Wrap.

spot<Container>(children: [spotSingle<Wrap>]).existsOnce();

Now, the child selector does not throw when the quantity doesn't match. Instead in checks that only a single Wrap is a child of Container. If Container would have 2+ or zero Wraps it would not find it instead. (filter it out as possible matching candidate)