Fixed
Status Update
Comments
pa...@google.com <pa...@google.com>
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit e008cd0a4d73ef1bdcf9bbb81a1f37ef7224e519
Author: Jelle Fresen <jellefresen@google.com>
Date: Wed Mar 10 18:20:16 2021
Add optional params to GestureScope.swipe functions
Refactored the implementations as well to make them more readable.
Bug: 182063305
Test: ./gradlew compose:ui:ui-test:cC
Relnote: "Added optional `startX`/`endX` and `startY`/`endY` parameters
to `swipeUp`/`swipeDown`/`swipeLeft`/`swipeRight` functions in
`GestureScope`."
Change-Id: I49e2d463a3cf71668a95ca9ebf9355905b6f352e
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta02.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/gesturescope/SendSwipeTest.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/GestureScope.kt
https://android-review.googlesource.com/1626561
Branch: androidx-main
commit e008cd0a4d73ef1bdcf9bbb81a1f37ef7224e519
Author: Jelle Fresen <jellefresen@google.com>
Date: Wed Mar 10 18:20:16 2021
Add optional params to GestureScope.swipe functions
Refactored the implementations as well to make them more readable.
Bug: 182063305
Test: ./gradlew compose:ui:ui-test:cC
Relnote: "Added optional `startX`/`endX` and `startY`/`endY` parameters
to `swipeUp`/`swipeDown`/`swipeLeft`/`swipeRight` functions in
`GestureScope`."
Change-Id: I49e2d463a3cf71668a95ca9ebf9355905b6f352e
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta02.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/gesturescope/SendSwipeTest.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/GestureScope.kt
jo...@jossiwolf.de <jo...@jossiwolf.de> #3
Lovely, thank you so much! love the tests btw :)
Description
Not sure if this is possible because of beta now, but it would be nice to add the start and end values of a swipe as parameters with default values to
swipeDown
,swipeUp
,swipeLeft
andswipeRight
.I was working on a test where I wanted to test a swipe upwards, but only to a certain point. Using
swipe
instead works, but it's not as readable if you have to calculate that in every test.This is what I had in mind:
Here's an example test of where this would be useful:
What do you think? It doesn't change existing behaviour and is backwards-compatible, but ofc still an API change.