APSL / react-native-keyboard-aware-scroll-view

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.
MIT License
5.27k stars 646 forks source link

Unexpected behaviour when testing with Detox #476

Closed dasaco closed 3 years ago

dasaco commented 3 years ago

Hi, first of all thank you for this library, great work!

I have been writing tests with Detox and I've encountered an issue when doing a scroll call.

it('can scroll to target view', async () => {
  await element(by.id('TestScreen__ScrollView')).scroll(600, 'down')
  await expect(element(by.id("TestScreen__TargetView"))).toBeVisible()
})

Scroll works, but then after it has scrolled 600 it immediately scrolls back, therefore failing the test. When I replace it with the react-native ScrollView it works as expected - just scrolls 600 and stops.

Has anyone encountered this issue before?