android-test icon indicating copy to clipboard operation
android-test copied to clipboard

Swipes are not working on Pixel 6

Open auras opened this issue 3 years ago • 2 comments

Description

Any swipe actions don't do anything more than press the screen in the same place on Pixel 6

Steps to Reproduce

onView(withId(R.id.recyclerView)).perform(swipeUp())

Expected Results

Should swipe up and the recyclerview scrolls

Actual Results

The recyclerview is just pressed down

AndroidX Test and Android OS Versions

Tesed with:

    implementation("androidx.recyclerview:recyclerview:1.2.1")
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

On Pixel 6 with Android 12L beta and Android 13 Beta 3.

Link to a public git repo demonstrating the problem:

See test: MyApplication.zip

Test works correctly on an emulator but not on Pixel 6

auras avatar Jun 14 '22 10:06 auras

is there any solution available for this ?

kartik1o avatar Jul 15 '22 18:07 kartik1o

The alpha fixes this.

auras avatar Jul 15 '22 18:07 auras

@auras could you specify which alpha fixes this?

I saw you were on androidx.test.espresso:espresso-core:3.4.0 at the time of reporting. Actually that version worked for me. But androidx.test.espresso:espresso-core:3.5.0-alpha04 introduced a problem with swipeLeft() where it seems to cause the swipe to happen on the UI, but the component swiped (Maplibre in my case) doesn't call the callbacks I passed to it. So I think it was probably a different issue from what you reported above. But if you could tell me which alpha you're referring to, that would be helpful.

mosofsky avatar Jan 27 '23 02:01 mosofsky

Whatever alpha was available at the time of writing, I don't remember, sorry

auras avatar Jan 27 '23 06:01 auras

Great responce.

Shankar-Prasad-K avatar Feb 27 '23 19:02 Shankar-Prasad-K