Skip to content

element(id).swipe('up', 'fast', 0.6) doesn't await scroll end #4858

@losikov

Description

@losikov

Did you test using the latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test fail and you're not sure why?

  • I have read the troubleshooting guide and it didn't help me.

What happened?

Description

When performing a swipe gesture on a view containing a native Fabric TableViewController component, Detox's swipe() method doesn't wait for the scroll animation to complete before continuing execution.

Steps to Reproduce

  1. Create a view with testID=bookReaderScreen containing a native Fabric TableViewController component
  2. Perform a swipe gesture using Detox:
    await element(by.id(`bookReaderScreen`)).swipe(direction, speed, percentage)
  3. Observe that the method returns immediately without waiting for scroll completion

Actual Behavior

The method returns not immediately, but not waiting for scroll to end:

14:59:18.714 detox[85681] i user -------- start swipe --------
  origin: at e2e/tests/reader-position-scroll.test.ts:34:15
14:59:20.297 detox[85681] i user -------- end swipe --------
  origin: at e2e/tests/reader-position-scroll.test.ts:36:15

The actual swipe animation continues for much longer than the ~1.6 seconds shown in the logs.

What was the expected behaviour?

The swipe() method should wait until the scroll animation/gesture is fully complete before resolving the promise.

It worked on react-native: "0.75.4", detox: "20.32.0", old arch.

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.44.0
React Native version: 81.4
Has Fabric (React Native's new rendering system) enabled: yes
Node version: v22.18.0
Device model: iPhone 15 simulator
iOS version: 17.5
macOS version: 15.6.1 (24G90)
Xcode version: 26.0.1
Test-runner (select one): jest

Detox logs

No response

Device logs

No response

More data, please!

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions