test_1899829_animeflv_net.py (992B)
1 import pytest 2 3 URL = "https://www3.animeflv.net" 4 ANIME_WITH_ESTRENO_CSS = ".Anime .Estreno" 5 6 7 async def is_green_estreno_banner_visible(client): 8 await client.navigate(URL, wait="none") 9 estreno = client.await_css(ANIME_WITH_ESTRENO_CSS, is_displayed=True) 10 # if we remove z-index from the parent link then the estreno banner will appear over it 11 # as it should, so we can compare screenshots to see if it was over it to begin with. 12 pre = estreno.screenshot() 13 client.execute_script("arguments[0].parentElement.style.zIndex = 'auto'", estreno) 14 post = estreno.screenshot() 15 return pre == post 16 17 18 @pytest.mark.skip_platforms("android") 19 @pytest.mark.asyncio 20 @pytest.mark.with_interventions 21 async def test_enabled(client): 22 assert await is_green_estreno_banner_visible(client) 23 24 25 @pytest.mark.skip_platforms("android") 26 @pytest.mark.asyncio 27 @pytest.mark.without_interventions 28 async def test_disabled(client): 29 assert not await is_green_estreno_banner_visible(client)