AdevintaSpain/Barista

Support for ViewPager2 in swipeViewPagerForward and swipeViewPagerBack

peterhav opened this issue · 1 comments

Description what you'd like to happen:

ViewPager2 has been introduced recently (https://developer.android.com/jetpack/androidx/releases/viewpager2) and does not yet seem to be supported in Baristra. Without support for ViewPager2, the swipeViewPagerForward and swipeViewPagerBack actions do not work and fail with a:

androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (is displayed on the screen to the user and is assignable from class: class androidx.viewpager.widget.ViewPager)

The hierarchy contains:

ViewPager2{id=2131296878, res-name=pager, visibility=VISIBLE, width=1080, height=1536, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@5cca82b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=144.0, child-count=1}

Related: #368