mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-26 08:30:01 +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 requests
|
||||
import time
|
||||
from json import JSONDecodeError
|
||||
|
||||
|
||||
class NetworkApi:
|
||||
@ -15,7 +16,7 @@ class NetworkApi:
|
||||
method = self.network_url + 'module=account&action=txlist&address=0x%s&sort=desc' % address
|
||||
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
|
||||
return requests.request('GET', url=method).json()['result']
|
||||
|
||||
@ -53,10 +54,13 @@ class NetworkApi:
|
||||
else:
|
||||
counter += 10
|
||||
time.sleep(10)
|
||||
if token:
|
||||
transactions = self.get_token_transaction(address=address)
|
||||
else:
|
||||
transactions = self.get_transactions(address=address)
|
||||
try:
|
||||
if token:
|
||||
transactions = self.get_token_transactions(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' %
|
||||
(amount, address))
|
||||
for transaction in transactions:
|
||||
|
@ -121,6 +121,7 @@ class HomeView(BaseView):
|
||||
def add_contact(self, public_key):
|
||||
start_new_chat = self.plus_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)
|
||||
one_to_one_chat = self.get_chat_view()
|
||||
start_new_chat.confirm_until_presence_of_element(one_to_one_chat.chat_message_input)
|
||||
|
Loading…
x
Reference in New Issue
Block a user