e2e: web3

This commit is contained in:
Churikova Tetiana 2022-09-23 10:55:36 +02:00
parent fac5301ace
commit 9a1f0a337e
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
5 changed files with 119 additions and 140 deletions

View File

@ -11,8 +11,6 @@ cytoolz==0.12.0
emoji==0.5.0
eth-hash==0.3.2
eth-keys
eth-utils==1.10.0
ethereum==2.3.2
execnet==1.7.1
future==0.18.2
flaky==3.7.0
@ -26,7 +24,7 @@ numpy==1.23.0
pbkdf2==1.3
Pillow==8.1.0
py==1.10.0
py-ecc==5.1.0
py-ecc==6.0.0
pycryptodome==3.9.9
pyethash==0.1.27
pyparsing==2.4.7
@ -39,7 +37,7 @@ pytz==2020.4
PyYAML==5.4
repoze.lru==0.7
requests==2.25.1
rlp==1.2.0
rlp==3.0.0
sauceclient==1.0.0
scrypt==0.8.17
selenium==3.14.1
@ -48,5 +46,10 @@ urllib3==1.26.12
yarl==1.6.3
docker==4.4.0
influxdb==5.3.1
web3==5.30.0
imagehash
web3==6.0.0b5
imagehash
hexbytes==0.2.2
eth-account==0.7.0
lru-dict==1.1.7
websockets==10.3
websocket-client==1.3.2

File diff suppressed because one or more lines are too long

View File

@ -80,7 +80,8 @@ class TestChatManagement(SingleDeviceTestCase):
sign_in = SignInView(self.driver).create_user(keycard=True)
wallet = sign_in.wallet_button.click()
status_account_address = wallet.get_wallet_address()[2:]
wallet.get_test_assets(keycard=True)
w3.donate_testnet_eth('0x%s' % status_account_address, 0.05)
wallet.wallet_button.double_click()
account_name = 'subaccount'
wallet.add_account(account_name, keycard=True)
wallet.get_account_by_name(account_name).click()
@ -472,11 +473,11 @@ class TestChatManagement(SingleDeviceTestCase):
if wallet.backup_recovery_phrase_warning_text.is_element_present():
self.driver.fail("'Back up your seed phrase' warning is shown on Wallet while no funds are present")
address = wallet.get_wallet_address()
wallet.close_button.click()
wallet.get_test_assets()
self.click = wallet.close_button.click()
w3.donate_testnet_eth(address, 0.0001)
wallet.wait_balance_is_changed()
if not wallet.backup_recovery_phrase_warning_text.is_element_present(30):
self.driver.fail("'Back up your seed phrase' warning is not shown on Wallet with funds")
wallet.donate_leftovers()
profile = wallet.get_profile_view()
wallet.backup_recovery_phrase_warning_text.click()
profile.backup_recovery_phrase()
@ -1064,10 +1065,11 @@ class TestChatManagement(SingleDeviceTestCase):
self.ens_name = 'purchased%s' % self.home.get_random_chat_name()
self.wallet = self.home.wallet_button.click()
self.address = self.wallet.get_wallet_address()
w3.donate_testnet_eth(self.address, 0.1)
self.wallet.wait_balance_is_changed()
self.chat_key = self.home.get_public_key_and_username()
self.wallet.just_fyi("Get required donate")
self.wallet.get_test_assets()
self.wallet.just_fyi("Get required STT")
self.wallet.get_test_assets(token=True)
self.wallet.just_fyi("Purchase ENS")

View File

@ -353,8 +353,8 @@ class BaseView(object):
if element == 'home':
element = self.home_button
while not element.is_element_present(1) and counter <= attempts:
self.driver.press_keycode(4)
try:
self.driver.press_keycode(4)
element.is_element_present(5)
return self
except (NoSuchElementException, TimeoutException):
@ -713,7 +713,7 @@ class BaseView(object):
send_transaction.set_max_button.click()
send_transaction.confirm()
send_transaction.chose_recipient_button.click()
send_transaction.set_recipient_address('0x2127edab5d08b1e11adf7ae4bae16c2b33fdf74a')
send_transaction.set_recipient_address('0xE2363E6e91d1a29d82C2c695fa8fa2e3Fa5d55eA')
send_transaction.sign_transaction_button.click()
send_transaction.sign_transaction(keycard=keycard)

View File

@ -175,7 +175,7 @@ class WalletView(BaseView):
self.accounts_status_account.scroll_to_element(direction='up')
return
def wait_balance_is_changed(self, asset='ETH', initial_balance=0, wait_time=120, scan_tokens=False, navigate_to_home=True):
def wait_balance_is_changed(self, asset='ETH', initial_balance=0, wait_time=180, scan_tokens=False, navigate_to_home=True):
self.driver.info('Waiting %ss for %s updated balance' % (wait_time, asset))
counter = 0
while True: