test_1902475_cdk_fairgoau_com.py (1475B)
1 import pytest 2 3 URL = "https://cdk.fairgoau.com:3572/Lobby.aspx?cdkModule=game&skinId=1&sessionGUID=00000000-0000-0000-0000-000000000000&gameId=18&machId=232&moduleName=plentifultreasure&sessionId=C83FC9F840F3A8C0&pid=10623177&language=EN&user=966995A905B8FF8765&sPassword=&encrypted=True&token=9D32886D-8755-4AFF-91BC-B1024E79890Fs%40Lt&forReal=True&returnURL=https%3A%2F%2Fcdk.fairgoau.com%2Flobby%2F%3FskinId%3D1&integration=external&clientIP=101.176.154.209%0D%0A%20%20%0D%0A%20%20&gameName=Plentiful%20Treasure&target=_self&thirdpartylogin=&isLobbyCore=true&isThemeDark=true&platformUrlHostSet=1" 4 FIRST_GAME_CSS = ".home-view-games-row .gametile" 5 FIRST_GAME_PRACTICE_CSS = ( 6 ".detailDialog button:not(#dialogTitleBarCloseBtn).bg-buttonSecondary" 7 ) 8 UNSUPPORTED_CSS = ".unsupported-device-box" 9 SUPPORTED_CSS = "#game_main" 10 11 12 async def get_to_page(client): 13 await client.navigate(URL) 14 client.click(client.await_css(FIRST_GAME_CSS, is_displayed=True)) 15 client.soft_click(client.await_css(FIRST_GAME_PRACTICE_CSS, is_displayed=True)) 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)