2017-08-28 10:02:20 +00:00
|
|
|
import asyncio
|
2018-01-26 11:07:09 +00:00
|
|
|
import logging
|
2018-01-03 09:34:40 +00:00
|
|
|
from datetime import datetime
|
2017-08-28 10:02:20 +00:00
|
|
|
|
2018-11-07 12:26:32 +00:00
|
|
|
from support.appium_container import AppiumContainer
|
2018-04-28 09:02:39 +00:00
|
|
|
from support.test_data import TestSuiteData
|
|
|
|
|
2017-08-28 10:02:20 +00:00
|
|
|
|
|
|
|
@asyncio.coroutine
|
2018-01-26 11:07:09 +00:00
|
|
|
def start_threads(quantity: int, func: type, returns: dict, *args):
|
2017-08-28 10:02:20 +00:00
|
|
|
loop = asyncio.get_event_loop()
|
2018-01-26 11:07:09 +00:00
|
|
|
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')
|
|
|
|
|
|
|
|
|
2018-04-28 09:02:39 +00:00
|
|
|
def debug(text: str):
|
2018-08-13 12:09:53 +00:00
|
|
|
logging.debug(text)
|
2017-08-28 10:02:20 +00:00
|
|
|
|
2018-01-03 09:34:40 +00:00
|
|
|
|
2018-02-26 23:38:56 +00:00
|
|
|
test_suite_data = TestSuiteData()
|
2018-11-07 12:26:32 +00:00
|
|
|
appium_container = AppiumContainer()
|
2017-09-26 10:50:34 +00:00
|
|
|
|
2018-06-01 16:37:44 +00:00
|
|
|
common_password = 'qwerty'
|
2018-08-23 13:50:19 +00:00
|
|
|
unique_password = 'unique' + get_current_time()
|
2018-07-19 09:57:45 +00:00
|
|
|
|
|
|
|
bootnode_address = "enode://a8a97f126f5e3a340cb4db28a1187c325290ec08b2c9a6b1f19845ac86c46f9fac2ba13328822590" \
|
|
|
|
"fd3de3acb09cc38b5a05272e583a2365ad1fa67f66c55b34@167.99.210.203:30404"
|
|
|
|
mailserver_address = "enode://531e252ec966b7e83f5538c19bf1cde7381cc7949026a6e499b6e998e695751aadf26d4c98d5a4eab" \
|
|
|
|
"fb7cefd31c3c88d600a775f14ed5781520a88ecd25da3c6:status-offline-inbox@35.225.227.79:30504"
|
2018-07-20 08:27:33 +00:00
|
|
|
|
|
|
|
camera_access_error_text = "To grant the required camera permission, please go to your system settings " \
|
|
|
|
"and make sure that Status > Camera is selected."
|
2018-08-02 10:11:45 +00:00
|
|
|
|
2018-08-27 18:24:51 +00:00
|
|
|
photos_access_error_text = "To grant the required photos permission, please go to your system settings " \
|
|
|
|
"and make sure that Status > Photos is selected."
|
|
|
|
|
2018-08-02 10:11:45 +00:00
|
|
|
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."
|
2019-10-18 13:23:36 +00:00
|
|
|
|
|
|
|
test_dapp_url = 'status-im.github.io/dapp'
|
|
|
|
test_dapp_name = 'status-im.github.io'
|