status-react/test/appium/tests/__init__.py

56 lines
2.2 KiB
Python

import asyncio
import logging
from datetime import datetime
from support.appium_container import AppiumContainer
from support.test_data import TestSuiteData
@asyncio.coroutine
def start_threads(quantity: int, func: type, returns: dict, *args):
loop = asyncio.get_event_loop()
for i in range(quantity):
returns[i] = loop.run_in_executor(None, func, *args)
for k in returns:
returns[k] = yield from returns[k]
return returns
def get_current_time():
return datetime.now().strftime('%-m%-d%-H%-M%-S')
def debug(text: str):
logging.debug(text)
test_suite_data = TestSuiteData()
appium_container = AppiumContainer()
common_password = 'qwerty'
unique_password = 'unique' + get_current_time()
bootnode_address = "enode://a8a97f126f5e3a340cb4db28a1187c325290ec08b2c9a6b1f19845ac86c46f9fac2ba13328822590" \
"fd3de3acb09cc38b5a05272e583a2365ad1fa67f66c55b34@167.99.210.203:30404"
mailserver_address = "enode://531e252ec966b7e83f5538c19bf1cde7381cc7949026a6e499b6e998e695751aadf26d4c98d5a4eab" \
"fb7cefd31c3c88d600a775f14ed5781520a88ecd25da3c6:status-offline-inbox@35.225.227.79:30504"
mailserver_central_2 = 'mail-02.gc-us-central1-a.eth.beta'
mailserver_central_3 = 'mail-03.gc-us-central1-a.eth.beta'
mailserver_staging_central_1 = 'mail-01.gc-us-central1-a.eth.staging'
mailserver_staging_ams_1 = 'mail-01.do-ams3.eth.staging'
mailserver_ams_01 = 'mail-01.do-ams3.eth.beta'
camera_access_error_text = "To grant the required camera permission, please go to your system settings " \
"and make sure that Status > Camera is selected."
photos_access_error_text = "To grant the required photos permission, please go to your system settings " \
"and make sure that Status > Photos is selected."
connection_not_secure_text = "Connection is not secure! " \
"Do not sign transactions or send personal data on this site."
connection_is_secure_text = "Connection is secure. Make sure you really trust this site " \
"before signing transactions or entering personal data."
test_dapp_url = 'status-im.github.io/dapp'
test_dapp_name = 'status-im.github.io'