swipeLeft broke in androidx.test.espresso:espresso-core:3.5.0-alpha04
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- mobile, testing-qa
Research direction
Start by comparing Espresso swipeLeft() behavior between espresso-core 3.5.0-alpha03 and 3.5.0-alpha04, using the MapView setup and OnMoveListener shown in the issue. Reproduce the integration test with onView(withContentDescription("myMapView")).perform(swipeLeft()) and inspect whether the three listener callbacks appear in the logs. Done means the newer version produces the expected callbacks without changing the Maplibre/Mapbox version.
Written by the indexing model from the issue text.
Description
Description
I'm trying to upgrade past androidx.test.espresso:espresso-core:3.5.0-alpha04 but something changed with swipeLeft() in that release. Although that release introduced slowSwipeLeft(), from looking at the change list, swipeLeft()'s behavior did not actually change, just its javadoc. So I'm thinking something else changed in that release.
Steps to Reproduce
- Create a Maplibre or Mapbox application. Here is how to initialize the mapView:
private lateinit var llMapViewContainer: ViewGroup
...
mapView = MapView(requireContext())
mapView!!.getMapAsync { mapboxMap: MapboxMap ->
mapboxMap.uiSettings.isAttributionEnabled = false
}
mapView!!.contentDescription = "myMapView"
mapViewContainer.addView(mapView)
mapView!!.onCreate(null)
mapView!!.onStart()
- Register an OnMoveListener like this:
mapboxMap.addOnMoveListener(object : MapboxMap.OnMoveListener {
override fun onMoveBegin(detector: MoveGestureDetector) {
Log.d("mytag", "MapboxOnMoveListener onMoveBegin")
}
override fun onMove(detector: MoveGestureDetector) {
Log.d("mytag", "MapboxOnMoveListener onMove")
}
override fun onMoveEnd(detector: MoveGestureDetector) {
Log.d("mytag", "MapboxOnMoveListener onMoveEnd")
}
})
- Depend on androidx.test.espresso:espresso-core:3.5.0-alpha04
- Write an integration test that performs a
onView(withContentDescription("myMapView")).perform(swipeLeft()) - Observe that none of the "mytag" log messages appear in the logs even though they do if you downgrade to androidx.test.espresso:espresso-core:3.5.0-alpha03
Expected Results
swipeLeft() should not only update the user interface but the component that I've registered a listener on (a Maplibre/Mapbox MapView in my case) should get notified so that it can call my callbacks on move start, on move, and on move end.
See at time 32 seconds in this video on the left side of the screen (uses androidx.test.espresso:espresso-core: prior to 3.5.0-alpha04) it shows how swipeLeft caused Maplibre's MapView to call my onMoveEnd callback.
Actual Results
The undesirable behavior I'm seeing is that although swipeLeft() causes a swipe gesture on a component (a Maplibre/Mapbox MapView in my case), that component no longer calls the callbacks it's supposed to call whenever it responds to a swipe (MapboxMap.OnMoveListener callbacks). The only change in code base is an upgrade from androidx.test.espresso:espresso-core:3.5.0-alpha03 to androidx.test.espresso:espresso-core:3.5.0-alpha04. I have not changed the version of Maplibre/Mapbox. So it has to be something in androidx.test.espresso:espresso-core:3.5.0-alpha04 that caused this behavior change.
See at time 32 seconds in this video on the right side of the screen it shows how swipeLeft no longer causes Maplibre's MapView to call my onMoveEnd callback.
AndroidX Test and Android OS Versions
Comparison of androidx.test.espresso:espresso-core:3.5.0-alpha03 which behaved correctly to androidx.test.espresso:espresso-core:3.5.0-alpha04 which does not behave corectly.
Link to a public git repo demonstrating the problem:
See video referenced above at time 32 seconds which shows how swipeLeft() differed between androidx.test.espresso:espresso-core:3.5.0-alpha03 and androidx.test.espresso:espresso-core:3.5.0-alpha04.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/android-test
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
android/android-test#681 · 2 comments · 1 reaction ·
-
ξεκσνδξδ Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2499 ·
-
ησξξσ Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2498 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
android/android-test#2473 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
android/android-test#2461 · 6 comments · 4 reactions ·
All issues in android/android-test
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100