maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[Enhancement] Hold and swipe/drag to reorder items

Open simon-gilmurray opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe. Some apps require holding and swiping/dragging to reorder items

Describe the solution you'd like Some kind of ability to perform the above, e.g. - longPressAndSwipeTo

simon-gilmurray avatar Jun 27 '23 14:06 simon-gilmurray

+1, I find this feature really useful. This behavior appears just after login flow, hence it is a blocker for the app that I test. Lack of this feature forces me to go with Appium instead of Maestro. Hopefully it will be released asap

razvanvancea avatar Jan 12 '24 21:01 razvanvancea

Hey Simon, thanks for this great feature idea!

What would be the API you'd like to see? An idea:

appId: com.example.example
---
- launchApp
- longPressOnAndSwipeTo:
    longPressOn: # accepts all params for longPressOn
    swipe: # accepts all params for swipe
- assertVisible: ...

This new hypothetical command would essentially be a mix of longPressOn and swipe.

bartekpacia avatar Jul 12 '24 23:07 bartekpacia

Hey Simon, thanks for this great feature idea!

What would be the API you'd like to see? An idea:

appId: com.example.example
---
- launchApp
- longPressOnAndSwipeTo:
    longPressOn: # accepts all params for longPressOn
    swipe: # accepts all params for swipe
- assertVisible: ...

This new hypothetical command would essentially be a mix of longPressOn and swipe.

@bartekpacia Yes that sounds ideal!

simon-gilmurray avatar Jul 15 '24 08:07 simon-gilmurray

Just throwing an idea out there - wouldn't it be interesting to make the API more generic by representing "drag and drop" with start, middle and end points? We have a use case where we need to draw a complete circle, and this could be a flexible way to accommodate that and potentially other complex gestures.

- gesture:
     start: {x: 200, y: 400}
     steps:
       - {x: 250, y: 350}
       - {x: 300, y: 400}
       - {x: 250, y: 450}
       - {x: 200, y: 400}

Then it could be nice to define the initial tab event to be of type press or longPress

skowrons avatar Aug 15 '24 11:08 skowrons

@skowrons

wouldn't it be interesting to make the API more generic by representing "drag and drop" with start, middle and end points?

Yeah, totally. I think we'd also need a way to specify timeout between gestures, and how long a move between each two points should take.

bartekpacia avatar Sep 04 '24 12:09 bartekpacia

Of course, contributions are welcome!

bartekpacia avatar Sep 04 '24 12:09 bartekpacia