Commit 17 of 54:
a8ea254b08
fix(test): dispatch popup touches through the native viewport
previous
next
whole branch
Review threads live on the whole diff, not on one commit, so
none are shown here - a thread's line means something in the
branch's final form, and painting it into an intermediate
step would put it on code it is not about.
packages/android/fixtures/native-navigation/NativeNavigationTest.kt modified +6 -1 Changes to packages/android/fixtures/native-navigation/NativeNavigationTest.kt ⋯ 1,611 lines Show the 1,611 lines above this hunk @@ -1612,7 +1612,11 @@ class NativeNavigationTest { 1612 1612 click ( activity , "toggle-nested-popup" ) 1613 1613 val nestedPopup = awaitView ( activity , "nested-popup" ) 1614 1614 awaitText ( activity , "nested-popup-content" , "Nested popup" ) 1615 - val popupRoot = awaitView ( activity , "root" ) 1615 + 1616 + 1617 + 1618 + val popupRoot = nestedPopup . parent as ViewGroup 1619 + assertSame ( "nested popup must share the screen viewport" , awaitView ( activity , "root" ) . parent , popupRoot ) 1616 1620 instrumentation . runOnMainSync { 1617 1621 val downTime = SystemClock . uptimeMillis ( ) 1618 1622 val x = ( popupRoot . width - 20 ) . toFloat ( ) ⋯ 17 lines Show the 17 lines above this hunk @@ -1636,6 +1640,7 @@ class NativeNavigationTest { 1636 1640 click ( activity , "toggle-popup" ) 1637 1641 val popup = awaitView ( activity , "native-popup" ) 1638 1642 awaitText ( activity , "popup-content" , "Popup content" ) 1643 + assertSame ( "standalone popup must share the screen viewport" , popupRoot , popup . parent ) 1639 1644 val safeRoot = awaitView ( activity , "root" ) 1640 1645 assertTrue ( 1641 1646 "non-modal top should use the screenViewport origin, not a second safe-area offset" ,