test_1943987_andisearch_com.py (834B)
1 import pytest 2 3 URL = "https://andisearch.com" 4 MSGBAR_CSS = ".rcw-sender" 5 6 7 async def is_msgbar_offscreen(client): 8 await client.navigate(URL, wait="none") 9 msgbar = client.await_css(MSGBAR_CSS, is_displayed=True) 10 return client.execute_script( 11 """ 12 const msgbar = arguments[0]; 13 return msgbar.getBoundingClientRect().bottom > window.innerHeight; 14 """, 15 msgbar, 16 ) 17 18 19 @pytest.mark.only_platforms("android") 20 @pytest.mark.actual_platform_required 21 @pytest.mark.asyncio 22 @pytest.mark.with_interventions 23 async def test_enabled(client): 24 assert not await is_msgbar_offscreen(client) 25 26 27 @pytest.mark.only_platforms("android") 28 @pytest.mark.actual_platform_required 29 @pytest.mark.asyncio 30 @pytest.mark.without_interventions 31 async def test_disabled(client): 32 assert await is_msgbar_offscreen(client)