⋯ 1,627 lines Show the 1,627 lines above this hunk @@ -1628,7 +1628,16 @@ class NativeNavigationTest { 1628 1628 click ( activity , "toggle-modal" ) 1629 1629 awaitText ( activity , "modal-status" , "modal shown" ) 1630 1630 click ( activity , "toggle-nested-popup" ) 1631 - val nestedPopup = awaitView ( activity , "nested-popup" ) 1631 + val popupDensity = activity . resources . displayMetrics . density 1632 + 1633 + 1634 + val nestedPopup = awaitView ( activity , "nested-popup" ) { view - > 1635 + view . visibility = = View . VISIBLE & & view . alpha > 0.01 f 1636 + & & kotlin . math . abs ( view . left - 48 * popupDensity ) < = 1 f 1637 + & & kotlin . math . abs ( view . top - 72 * popupDensity ) < = 1 f 1638 + & & kotlin . math . abs ( view . width - 160 * popupDensity ) < = 1 f 1639 + & & kotlin . math . abs ( view . height - 64 * popupDensity ) < = 1 f 1640 + } 1632 1641 awaitText ( activity , "nested-popup-content" , "Nested popup" ) 1633 1642 1634 1643 ⋯ 22 lines Show the 22 lines above this hunk @@ -1657,9 +1666,9 @@ class NativeNavigationTest { 1657 1666 assertTrue ( "dismissed nested popup should be removed" , nestedPopupRemoved | | nestedPopup . visibility ! = View . VISIBLE ) 1658 1667 assertEquals ( "dismissing a nested popup should retain its parent modal" , View . VISIBLE , modal . visibility ) 1659 1668 click ( activity , "toggle-popup" ) 1660 - val popupDensity = activity . resources . displayMetrics . density 1661 1669 val popup = awaitView ( activity , "native-popup" ) { view - > 1662 - kotlin . math . abs ( view . left - 24 * popupDensity ) < = 1 f 1670 + view . visibility = = View . VISIBLE & & view . alpha > 0.01 f 1671 + & & kotlin . math . abs ( view . left - 24 * popupDensity ) < = 1 f 1663 1672 & & kotlin . math . abs ( view . top - 36 * popupDensity ) < = 1 f 1664 1673 & & kotlin . math . abs ( view . width - 180 * popupDensity ) < = 1 f 1665 1674 & & kotlin . math . abs ( view . height - 72 * popupDensity ) < = 1 f