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
|
2020-11-11 15:37:27 +00:00
|
|
|
import os
|
|
|
|
import json
|
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
|
|
|
|
2019-11-29 11:48:07 +00:00
|
|
|
pytest_config_global = dict()
|
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()
|
2020-05-14 10:41:09 +00:00
|
|
|
pin = '121212'
|
|
|
|
puk = '000000000000'
|
|
|
|
pair_code= '000000'
|
2018-07-19 09:57:45 +00:00
|
|
|
|
2020-02-24 11:30:45 +00:00
|
|
|
bootnode_address = "enode://a8a97f126f5e3a340cb4db28a1187c325290ec08b2c9a6b1f19845ac86c46f9fac2ba13328822590" \
|
|
|
|
"fd3de3acb09cc38b5a05272e583a2365ad1fa67f66c55b34@167.99.210.203:30404"
|
2020-12-03 12:59:20 +00:00
|
|
|
# referred to https://github.com/status-im/status-react/blob/develop/resources/config/fleets.json
|
|
|
|
mailserver_address = "enode://69f72baa7f1722d111a8c9c68c39a31430e9d567695f6108f31ccb6cd8f0adff4991e7fdca8fa770e75bc8a511" \
|
|
|
|
"a87d24690cbc80e008175f40c157d6f6788d48:status-offline-inbox@206.189.240.16:443"
|
2020-01-21 13:59:01 +00:00
|
|
|
staging_fleet = 'eth.staging'
|
|
|
|
prod_fleet = 'eth.prod'
|
2020-06-29 10:42:14 +00:00
|
|
|
# This fleet is used in the tests
|
|
|
|
used_fleet = staging_fleet
|
2020-11-03 16:15:14 +00:00
|
|
|
geth_log_emulator_path = '/storage/emulated/0/Android/data/im.status.ethereum/files/Download/geth.log'
|
2020-06-29 10:42:14 +00:00
|
|
|
|
2020-01-21 13:59:01 +00:00
|
|
|
mailserver_ams = 'mail-01.do-ams3'
|
2020-07-06 13:04:39 +00:00
|
|
|
mailserver_hk = 'mail-01.ac-cn-hongkong-c'
|
2020-01-21 13:59:01 +00:00
|
|
|
mailserver_gc = 'mail-01.gc-us-central1-a'
|
2019-10-18 13:23:36 +00:00
|
|
|
|
2020-10-14 09:34:53 +00:00
|
|
|
test_dapp_web_url = "status-im.github.io/dapp"
|
2020-05-06 14:41:39 +00:00
|
|
|
test_dapp_url = 'simpledapp.eth'
|
2020-05-07 10:15:35 +00:00
|
|
|
test_dapp_name = 'simpledapp.eth'
|
2020-08-14 16:05:41 +00:00
|
|
|
|
2020-11-11 15:37:27 +00:00
|
|
|
emojis = {'thumbs-up': 2, 'thumbs-down': 3, 'love': 1, 'laugh': 4, 'angry': 6, 'sad': 5}
|
|
|
|
|
2020-11-03 16:15:14 +00:00
|
|
|
|
2020-11-11 15:37:27 +00:00
|
|
|
with open(os.sep.join(__file__.split(os.sep)[:-1]) + '/../../../translations/en.json') as json_file:
|
|
|
|
transl = json.load(json_file)
|