Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support swipe actions from a given start point to an end point #674

Open
steviki opened this issue Jan 23, 2018 · 0 comments · May be fixed by #675
Open

Support swipe actions from a given start point to an end point #674

steviki opened this issue Jan 23, 2018 · 0 comments · May be fixed by #675

Comments

@steviki
Copy link

steviki commented Jan 23, 2018

With the currently existing API it's not possible to swipe in any arbitrary direction, but only in a defined GREYDirection (left, right, up or down).
Swiping in any direction, for example from a given start point to a given end point, might also be needed to test some UI components.

I propose adding new public swipe actions, that take a start point and an end point and perform a swipe along these points.

The API for the actions might look like this:

grey_swipeFastFromStartToEndPoint(CGPoint startPoint, CGPoint endPoint);
grey_swipeSlowFromStartToEndPoint(CGPoint startPoint, CGPoint endPoint);


The implementation might be either a new GREYBaseAction subclass, or by extending GREYSwipeAction with this functionality.

This can be implemented similar to the existing GREYSwipeAction, by using

[GREYPathGestureUtils touchPathForDragGestureWithStartPoint: endPoint: cancelInertia:]

instead of

NSArray *touchPath = [GREYPathGestureUtils touchPathForGestureWithStartPoint:startPoint
andDirection:_direction
andDuration:_duration
inWindow:window];

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

Successfully merging a pull request may close this issue.

1 participant