Detox: scrollTo() edges on Flat List carries on scrolling when reaching the end

Created on 2 May 2020  Â·  13Comments  Â·  Source: wix/Detox

Description

When using scrollTo('right') or left on FlatList, Detox carries on scrolling after reaching the end of the list.

Reproduction

  1. Have an app with a FlatList containing several elements horizontally
  2. Add a testID to the ScrollView of the FlatList
  3. Use scrollTo() (right or left, where the list carries on)

Expected behavior

Detox ends the scrolling when it reaches the end of the list.

Environment (please complete the following information):

  • Detox: 16.3.0
  • React Native: 0.62.2
  • Node: 14.0.0
  • Device: iPhone 11
  • Xcode: 11.4.1
  • iOS: 13.4.1
acceptebug ios 📌 pinned

Most helpful comment

Thank you! Please do not delete this repo.

All 13 comments

Could you please create a small project that recreates this?

While we probably won't be able to fix this in the current Earl Grey implementation of scrolling, we are working on major rewrites that will be using a bespoke implementation, and I would like to under stand what the issue is exactly so we can get it right in that implementation. It could be that there is no way to know we've reached the end of the content size due to shenanigans in the FlatList implementation.

Sure, I'll get you one as soon as I can. Thanks.

Thank you!

Thank you! Please do not delete this repo.

I seem to have a similar issue with swipe(), the swipe just doesn't stop, so the Promise is never resolved.

Please try on latest Detox version and report back. Thanks

I've tested and test passes, however it doesn't scroll at all, this happens both on Android and iOS.

On iOS, if I expect an element out of bounds in the FlatList to exist, it passes, therefore it's in the iOS hierarchy at least. Although I guess we want same functionality on both platforms, perhaps it could try and scroll on both?

The issue here was infinite scroll. The Android exist is a separate issue.

So the current situation of no scrolling at all is the desired outcome?

On Fri, 26 Jun 2020 at 13:02, Leo Natan notifications@github.com wrote:

The issue here was infinite scroll. The Android exist is a separate issue.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wix/Detox/issues/2029#issuecomment-650142476, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AGYSXO3ZEDTAS4CP5OUE6NLRYSE53ANCNFSM4MXWUX4A
.

Doesn’t sound right. I’ll look to reproduce with your repo.

Please try with the latest version of Detox and see if it reproduces. There were many recent changes made to scrolling.

I'll close this issue. If a similar issue persists, please open a new one. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhyousefi picture mhyousefi  Â·  3Comments

carlosalmonte04 picture carlosalmonte04  Â·  4Comments

isnifer picture isnifer  Â·  4Comments

gtRfnkN picture gtRfnkN  Â·  4Comments

rborn picture rborn  Â·  3Comments