From d30f03d0945c02a85759132a4eede654972d89b5 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Thu, 15 Aug 2024 23:35:50 -0700 Subject: [PATCH] Added new slowSwipeUp Locator PiperOrigin-RevId: 663617977 --- espresso/CHANGELOG.md | 2 ++ .../java/androidx/test/espresso/action/ViewActions.java | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/espresso/CHANGELOG.md b/espresso/CHANGELOG.md index a1888dc4e..9ee466424 100644 --- a/espresso/CHANGELOG.md +++ b/espresso/CHANGELOG.md @@ -27,3 +27,5 @@ The following artifacts were released: **Breaking API Changes** **Known Issues** + +**New Locator declared** diff --git a/espresso/core/java/androidx/test/espresso/action/ViewActions.java b/espresso/core/java/androidx/test/espresso/action/ViewActions.java index 352dc29c5..a6111ee50 100644 --- a/espresso/core/java/androidx/test/espresso/action/ViewActions.java +++ b/espresso/core/java/androidx/test/espresso/action/ViewActions.java @@ -586,4 +586,13 @@ public interface BitmapReceiver { public static ViewAction captureToBitmap(BitmapReceiver bitmapReceiver) { return new CaptureToBitmapAction(bitmapReceiver); } + + public static ViewAction slowSwipeUp() { + return actionWithAssertions( + new GeneralSwipeAction( + Swipe.SLOW, + GeneralLocation.translate(GeneralLocation.BOTTOM_CENTER, 0, -EDGE_FUZZ_FACTOR), + GeneralLocation.TOP_CENTER, + Press.FINGER)); + } }