test_1738319_yebocasino_co_za.py (1009B)
1 import pytest 2 3 URL = "https://www.yebocasino.co.za/webplay/" 4 PRACTICE_CSS = "#lobbybox_featuredgames .gamebox .cta.practice" 5 IFRAME_CSS = "#gameiframe" 6 UNSUPPORTED_CSS = ".unsupported-device-box" 7 SUPPORTED_CSS = "#game_main" 8 9 10 async def get_to_page(client): 11 await client.navigate(URL) 12 if client.execute_script("return location.href.includes('unavailable')"): 13 pytest.skip("Region-locked, cannot test. Try using a VPN set to South Africa.") 14 return 15 client.soft_click(client.await_css(PRACTICE_CSS)) 16 client.switch_to_frame(client.await_css(IFRAME_CSS)) 17 18 19 @pytest.mark.only_platforms("android") 20 @pytest.mark.asyncio 21 @pytest.mark.with_interventions 22 async def test_enabled(client): 23 await get_to_page(client) 24 assert client.await_css(SUPPORTED_CSS, timeout=60) 25 26 27 @pytest.mark.only_platforms("android") 28 @pytest.mark.asyncio 29 @pytest.mark.without_interventions 30 async def test_disabled(client): 31 await get_to_page(client) 32 assert client.await_css(UNSUPPORTED_CSS, timeout=60)