test_1830739_1904935_rubyslots_com.py (967B)
1 import pytest 2 3 URL = "https://www.rubyslots.com/webplay/" 4 FIRST_GAME_CSS = ".gamepreview:has(.cta.practice)" 5 FIRST_GAME_PRACTICE_CSS = ".gamepreview .cta.practice" 6 IFRAME_CSS = "#gameiframe" 7 UNSUPPORTED_CSS = ".unsupported-device-box" 8 SUPPORTED_CSS = "#game_main" 9 10 11 async def get_to_page(client): 12 await client.navigate(URL) 13 client.click(client.await_css(FIRST_GAME_CSS, is_displayed=True)) 14 client.soft_click(client.await_css(FIRST_GAME_PRACTICE_CSS, is_displayed=True)) 15 client.switch_to_frame(client.await_css(IFRAME_CSS)) 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 get_to_page(client) 23 assert client.await_css(SUPPORTED_CSS, timeout=30) 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 get_to_page(client) 31 assert client.await_css(UNSUPPORTED_CSS, timeout=30)