react-nativereact-native-pager-viewmaestro

Addition of Pager View breaks scrolling with Maestro on iOS


I'm seeing a total failure of our Maestro tests because of the recent addition of a carousel/pager on the home screen - Maestro seems unable to scroll at all, either by scroll or scrollUntilVisible, with the carousel present. Since it's at the top of a long page, this breaks most of our tests.

Details:

Does anyone have any idea why this might be happening, or a workaround? Or, failing that, some way to move the page down beyond the carousel without using scroll or scrollUntilVisible? (I looked at travel, but not sure if that could be used for this.) If I manually scroll the emulator past it and then run scroll in Maestro Studio, it works again, so any way of getting the page past the carousel would probably work.


Solution

  • Turns out the issue seems to be that react-native-pager-view's implementation of UIPageViewController doesn't seem to play nice with Maestro's scroll and scrollUntilVisible commands.

    Instead, use swipe to swipe past the element, then scrollUntilVisible will work fine.

    - runFlow:
        when:
          platform: iOS
        commands: 
        - swipe:
          start: 50%, 75%
          end: 50%, 55%