mirror of
https://github.com/status-im/status-react.git
synced 2025-01-27 19:26:05 +00:00
false failures fix
Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
parent
bf068f7909
commit
1b2eb5826a
@ -2,6 +2,7 @@ import logging
|
|||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
import time
|
import time
|
||||||
|
from json import JSONDecodeError
|
||||||
|
|
||||||
|
|
||||||
class NetworkApi:
|
class NetworkApi:
|
||||||
@ -15,7 +16,7 @@ class NetworkApi:
|
|||||||
method = self.network_url + 'module=account&action=txlist&address=0x%s&sort=desc' % address
|
method = self.network_url + 'module=account&action=txlist&address=0x%s&sort=desc' % address
|
||||||
return requests.request('GET', url=method).json()['result']
|
return requests.request('GET', url=method).json()['result']
|
||||||
|
|
||||||
def get_token_transaction(self, address: str) -> dict:
|
def get_token_transactions(self, address: str) -> dict:
|
||||||
method = self.network_url + 'module=account&action=tokentx&address=0x%s&sort=desc' % address
|
method = self.network_url + 'module=account&action=tokentx&address=0x%s&sort=desc' % address
|
||||||
return requests.request('GET', url=method).json()['result']
|
return requests.request('GET', url=method).json()['result']
|
||||||
|
|
||||||
@ -53,10 +54,13 @@ class NetworkApi:
|
|||||||
else:
|
else:
|
||||||
counter += 10
|
counter += 10
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
if token:
|
try:
|
||||||
transactions = self.get_token_transaction(address=address)
|
if token:
|
||||||
else:
|
transactions = self.get_token_transactions(address)
|
||||||
transactions = self.get_transactions(address=address)
|
else:
|
||||||
|
transactions = self.get_transactions(address)
|
||||||
|
except JSONDecodeError:
|
||||||
|
continue
|
||||||
logging.info('Looking for a transaction with unique amount %s in list of transactions, address is %s' %
|
logging.info('Looking for a transaction with unique amount %s in list of transactions, address is %s' %
|
||||||
(amount, address))
|
(amount, address))
|
||||||
for transaction in transactions:
|
for transaction in transactions:
|
||||||
|
@ -121,6 +121,7 @@ class HomeView(BaseView):
|
|||||||
def add_contact(self, public_key):
|
def add_contact(self, public_key):
|
||||||
start_new_chat = self.plus_button.click()
|
start_new_chat = self.plus_button.click()
|
||||||
start_new_chat.start_new_chat_button.click()
|
start_new_chat.start_new_chat_button.click()
|
||||||
|
start_new_chat.public_key_edit_box.wait_for_visibility_of_element()
|
||||||
start_new_chat.public_key_edit_box.set_value(public_key)
|
start_new_chat.public_key_edit_box.set_value(public_key)
|
||||||
one_to_one_chat = self.get_chat_view()
|
one_to_one_chat = self.get_chat_view()
|
||||||
start_new_chat.confirm_until_presence_of_element(one_to_one_chat.chat_message_input)
|
start_new_chat.confirm_until_presence_of_element(one_to_one_chat.chat_message_input)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user