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

Add drag until visible #59

Closed danielmolnar closed 4 months ago

danielmolnar commented 4 months ago

This PR adds dragUntilVisible to spot

final firstItem = spotText('Item at index: 3', exact: true)..existsOnce();
final secondItem = spotText('Item at index: 27', exact: true)..doesNotExist();
await act.dragUntilVisible(
  dragStart: firstItem,
  dragTarget: secondItem,
  maxIteration: 30,
   moveStep: const Offset(0, -100),
);
secondItem.existsOnce();