test_1830739_1902453_palaceofchance_com.py (824B)
1 import pytest 2 3 URL = "https://www.palaceofchance.com/webplay/" 4 FIRST_GAME_CSS = ".gameitem a" 5 IFRAME_CSS = ".gameframe iframe" 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 client.soft_click(client.await_css(FIRST_GAME_CSS, is_displayed=True)) 13 client.switch_to_frame(client.await_css(IFRAME_CSS)) 14 15 16 @pytest.mark.only_platforms("android") 17 @pytest.mark.asyncio 18 @pytest.mark.with_interventions 19 async def test_enabled(client): 20 await get_to_page(client) 21 assert client.await_css(SUPPORTED_CSS, timeout=30) 22 23 24 @pytest.mark.only_platforms("android") 25 @pytest.mark.asyncio 26 @pytest.mark.without_interventions 27 async def test_disabled(client): 28 await get_to_page(client) 29 assert client.await_css(UNSUPPORTED_CSS, timeout=30)