test_1919004_editorcontexto_com_br.py (749B)
1 import pytest 2 3 URL = "https://www.editoracontexto.com.br/" 4 TOP_BAR_CSS = ".ui.container.QDheader" 5 6 7 def top_bar_is_at_top(client): 8 top_bar = client.await_css(TOP_BAR_CSS, is_displayed=True) 9 assert top_bar 10 return client.execute_script( 11 """ 12 return arguments[0].getBoundingClientRect().top == 0; 13 """, 14 top_bar, 15 ) 16 17 18 @pytest.mark.only_platforms("android") 19 @pytest.mark.asyncio 20 @pytest.mark.with_interventions 21 async def test_enabled(client): 22 await client.navigate(URL) 23 assert top_bar_is_at_top(client) 24 25 26 @pytest.mark.only_platforms("android") 27 @pytest.mark.asyncio 28 @pytest.mark.without_interventions 29 async def test_disabled(client): 30 await client.navigate(URL) 31 assert not top_bar_is_at_top(client)