test_1903480_ace7_acecombat_jp.py (828B)
1 import asyncio 2 3 import pytest 4 5 URL = "https://ace7.acecombat.jp" 6 7 HERO_CSS = "body.videoLoaded" 8 9 10 async def is_mousewheel_scrolling_too_fast(client): 11 await client.navigate(URL, wait="none") 12 hero = client.await_css(HERO_CSS, is_displayed=True, timeout=60) 13 await client.send_apz_scroll_gesture(-100, element=hero, offset=[200, 200]) 14 await asyncio.sleep(2) 15 after = client.execute_script("return window.scrollY") 16 return after > 400 17 18 19 @pytest.mark.skip_platforms("android") 20 @pytest.mark.asyncio 21 @pytest.mark.with_interventions 22 async def test_enabled(client): 23 assert not await is_mousewheel_scrolling_too_fast(client) 24 25 26 @pytest.mark.skip_platforms("android") 27 @pytest.mark.asyncio 28 @pytest.mark.without_interventions 29 async def test_disabled(client): 30 assert await is_mousewheel_scrolling_too_fast(client)