-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: add duration
and point
(optional) parameters for longPress()
action.
#4475
Conversation
detox/android/detox/src/main/java/com/wix/detox/espresso/action/DetoxMultiTap.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏 Looks very promising, but I see a couple of things that should be addressed early. Please see my comments.
) | ||
} | ||
); | ||
return t.functionDeclaration( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the overload generation is a brilliant mechanism and this is worth its own pull request, can we stop for a a second and discuss if a DTO argument could be a better idea, still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to align with the current longPress(duration)
API we have (iOS-only)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can, possibly, enable both DTO and duration
only but it feels a bit dirty.
also, it makes sense to align with tap({x: number, y: number})
for the point param.
5536c07
to
7f1aa93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commenting my 2 cent notes
detox/android/detox/src/main/java/com/wix/detox/espresso/action/common/TapEvents.kt
Outdated
Show resolved
Hide resolved
detox/android/detox/src/main/java/com/wix/detox/espresso/action/DetoxCustomTapper.kt
Show resolved
Hide resolved
Released with Detox 20.21.0. |
This pull request introduces optional parameters for the
longPress()
action on both iOS and Android:duration: number
: Specifies the duration of the long press (in ms). This parameter was previously supported on iOS but has now been extended to Android.point: {x: number, y: number}
: Defines the position of the long press within the element's coordinate space.Documentation has been updated accordingly, and relevant end-to-end tests have been added.