e2e: requirements cleanup

This commit is contained in:
Yevheniia Berdnyk 2025-01-06 15:18:07 +02:00
parent 28a81f2dd8
commit 813c60f9e1
No known key found for this signature in database
6 changed files with 56 additions and 108 deletions

View File

@ -1,58 +1,11 @@
Appium-Python-Client==2.11.1 pytest~=7.4.0
Pillow==10.0.0 Appium-Python-Client~=2.11.1
PyGithub==1.55 selenium~=4.11.2
PyYAML==5.3.1 emoji~=0.5.0
Cython<3.0 urllib3~=1.26.12
aiohttp==3.8.1 requests~=2.31.0
allpairspy==2.5.0 filelock~=3.16.1
apipkg==1.5 python-dateutil~=2.8.1
async-timeout==4.0.1 ImageHash~=4.3.1
certifi==2023.7.22 Pillow~=10.0.0
chardet==3.0.4 pytz~=2020.4
cycler==0.10.0
cytoolz==0.12.0
docker==4.4.0
emoji==0.5.0
eth-account==0.7.0
eth-hash==0.3.2
eth-keys
execnet==1.7.1
filelock==3.16.1
flaky==3.7.0
future==0.18.2
hexbytes==0.2.2
idna==2.10
imagehash
influxdb==5.3.1
kiwisolver==1.3.1
lru-dict==1.1.7
lxml==4.6.5
matplotlib==3.3.3
multidict==5.0.2
namedlist==1.8
numpy==1.23.0
pbkdf2==1.3
py-ecc==6.0.0
py==1.10.0
pycryptodome==3.9.9
pyethash==0.1.27
pyparsing==2.4.7
pysha3==1.0.2
pytest-forked==1.3.0
pytest-xdist==3.2.0
pytest==7.2.1
python-dateutil==2.8.1
pytz==2020.4
repoze.lru==0.7
requests==2.31.0
rlp==3.0.0
sauceclient==1.0.0
saucelab-api-client==0.6.2
scrypt==0.8.17
selenium==4.11.2
six==1.16.0
urllib3==1.26.12
web3==6.0.0b5
websocket-client==1.3.2
websockets==10.3
yarl==1.6.3

View File

@ -422,8 +422,10 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
try: try:
chat_element.wait_for_visibility_of_element(120) chat_element.wait_for_visibility_of_element(120)
received = True received = True
if chat_element.image_container_in_message.is_element_differs_from_template("images_gallery.png", 5): image = chat_element.image_container_in_message
self.errors.append("Gallery message do not match the template!") if (image.is_element_differs_from_template("images_gallery.png", 5) and
image.is_element_differs_from_template("images_gallery_inverted.png", 5)):
self.errors.append("Gallery message does not match the template!")
except TimeoutException: except TimeoutException:
self.errors.append("Gallery message was not received") self.errors.append("Gallery message was not received")
received = False received = False

View File

@ -161,7 +161,6 @@ class TestFallbackMultipleDevice(MultipleSharedDeviceTestCase):
self.errors.verify_no_errors() self.errors.verify_no_errors()
@marks.testrail_id(741054) @marks.testrail_id(741054)
@marks.xfail(reason="Arbiscan API is down, looking for analogue")
def test_fallback_add_key_pair(self): def test_fallback_add_key_pair(self):
account_to_add = transaction_senders['ETH_1'] account_to_add = transaction_senders['ETH_1']
self.home_1.navigate_back_to_home_view() self.home_1.navigate_back_to_home_view()
@ -227,12 +226,13 @@ class TestFallbackMultipleDevice(MultipleSharedDeviceTestCase):
self.errors.append("Key pair account is not shown in profile as on device after importing key pair") self.errors.append("Key pair account is not shown in profile as on device after importing key pair")
self.profile_2.click_system_back_button(times=3) self.profile_2.click_system_back_button(times=3)
wallet_2.just_fyi("Device 2: check wallet balance") # ToDo: Arbiscan API is down, looking for analogue
wallet_2.set_network_in_wallet(network_name='Arbitrum') # wallet_2.just_fyi("Device 2: check wallet balance")
expected_balance = self.network_api.get_balance(key_pair_account_address) # wallet_2.set_network_in_wallet(network_name='Arbitrum')
shown_balance = wallet_2.get_asset(asset_name='Ether').get_amount() # expected_balance = self.network_api.get_balance(key_pair_account_address)
if shown_balance != round(expected_balance, 5): # shown_balance = wallet_2.get_asset(asset_name='Ether').get_amount()
self.errors.append("Device 2: ETH balance %s doesn't match expected %s" % (shown_balance, expected_balance)) # if shown_balance != round(expected_balance, 5):
# self.errors.append("Device 2: ETH balance %s doesn't match expected %s" % (shown_balance, expected_balance))
wallet_2.just_fyi("Device 2: check derivation paths of the regular and key pair accounts") wallet_2.just_fyi("Device 2: check derivation paths of the regular and key pair accounts")
account_element = wallet_2.get_account_element(account_name=regular_account_name) account_element = wallet_2.get_account_element(account_name=regular_account_name)

View File

@ -36,28 +36,31 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
self.network = "Arbitrum" self.network = "Arbitrum"
def _get_balances_before_tx(self): def _get_balances_before_tx(self):
sender_balance = self.network_api.get_balance(self.sender['wallet_address']) # ToDo: Arbiscan API is down, looking for analogue
receiver_balance = self.network_api.get_balance(self.receiver['wallet_address']) # sender_balance = self.network_api.get_balance(self.sender['wallet_address'])
# receiver_balance = self.network_api.get_balance(self.receiver['wallet_address'])
self.wallet_1.just_fyi("Getting ETH amount in the wallet of the sender before transaction") self.wallet_1.just_fyi("Getting ETH amount in the wallet of the sender before transaction")
self.wallet_1.get_account_element().click() self.wallet_1.get_account_element().click()
eth_amount_sender = self.wallet_1.get_asset(asset_name='Ether').get_amount() eth_amount_sender = self.wallet_1.get_asset(asset_name='Ether').get_amount()
self.wallet_2.just_fyi("Getting ETH amount in the wallet of the receiver before transaction") self.wallet_2.just_fyi("Getting ETH amount in the wallet of the receiver before transaction")
self.wallet_2.get_account_element().click() self.wallet_2.get_account_element().click()
eth_amount_receiver = self.wallet_2.get_asset(asset_name='Ether').get_amount() eth_amount_receiver = self.wallet_2.get_asset(asset_name='Ether').get_amount()
return sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver # return sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver
return eth_amount_sender, eth_amount_receiver
def _check_balances_after_tx(self, amount_to_send, sender_balance, receiver_balance, eth_amount_sender, def _check_balances_after_tx(self, amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
eth_amount_receiver): eth_amount_receiver):
try: # ToDo: Arbiscan API is down, looking for analogue
self.network_api.wait_for_balance_to_be(address=self.sender['wallet_address'], # try:
expected_balance=sender_balance - amount_to_send) # self.network_api.wait_for_balance_to_be(address=self.sender['wallet_address'],
except TimeoutException as e: # expected_balance=sender_balance - amount_to_send)
self.errors.append("Sender " + e.msg) # except TimeoutException as e:
try: # self.errors.append("Sender " + e.msg)
self.network_api.wait_for_balance_to_be(address=self.receiver['wallet_address'], # try:
expected_balance=receiver_balance + amount_to_send) # self.network_api.wait_for_balance_to_be(address=self.receiver['wallet_address'],
except TimeoutException as e: # expected_balance=receiver_balance + amount_to_send)
self.errors.append("Receiver " + e.msg) # except TimeoutException as e:
# self.errors.append("Receiver " + e.msg)
def wait_for_wallet_balance_to_update(wallet_view, user_name, initial_eth_amount): def wait_for_wallet_balance_to_update(wallet_view, user_name, initial_eth_amount):
wallet_view.just_fyi("Getting ETH amount in the wallet of the %s after transaction" % user_name) wallet_view.just_fyi("Getting ETH amount in the wallet of the %s after transaction" % user_name)
@ -124,11 +127,11 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
wallet_view.close_account_button.click_until_presence_of_element(wallet_view.show_qr_code_button) wallet_view.close_account_button.click_until_presence_of_element(wallet_view.show_qr_code_button)
@marks.testrail_id(727229) @marks.testrail_id(727229)
@marks.xfail(reason="Arbiscan API is down, looking for analogue")
def test_wallet_send_eth(self): def test_wallet_send_eth(self):
self.wallet_1.set_network_in_wallet(network_name=self.network) self.wallet_1.set_network_in_wallet(network_name=self.network)
self.wallet_2.set_network_in_wallet(network_name=self.network) self.wallet_2.set_network_in_wallet(network_name=self.network)
sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx() # sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
self.wallet_2.close_account_button.click() self.wallet_2.close_account_button.click()
self.wallet_2.chats_tab.click() self.wallet_2.chats_tab.click()
@ -140,13 +143,15 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
asset_name='Ether', asset_name='Ether',
amount=amount_to_send, amount=amount_to_send,
network_name=self.network) network_name=self.network)
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'], # ToDo: Arbiscan API is down, looking for analogue
tx_time=device_time_before_sending) # self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
# tx_time=device_time_before_sending)
device_time_after_sending = self.wallet_1.driver.device_time device_time_after_sending = self.wallet_1.driver.device_time
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender, # self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
eth_amount_receiver) # eth_amount_receiver)
self._check_balances_after_tx(amount_to_send, None, None, eth_amount_sender, eth_amount_receiver)
# ToDo: enable when issues 20807 and 20808 are fixed # ToDo: enable when issues 20807 and 20808 are fixed
# self.loop.run_until_complete( # self.loop.run_until_complete(
@ -160,10 +165,10 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
self.errors.verify_no_errors() self.errors.verify_no_errors()
@marks.testrail_id(727230) @marks.testrail_id(727230)
@marks.xfail(reason="Arbiscan API is down, looking for analogue")
def test_wallet_send_asset_from_drawer(self): def test_wallet_send_asset_from_drawer(self):
self.wallet_1.navigate_back_to_wallet_view() self.wallet_1.navigate_back_to_wallet_view()
sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx() # sender_balance, receiver_balance, eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
eth_amount_sender, eth_amount_receiver = self._get_balances_before_tx()
self.wallet_2.close_account_button.click_if_shown() self.wallet_2.close_account_button.click_if_shown()
self.wallet_2.chats_tab.click() self.wallet_2.chats_tab.click()
@ -174,12 +179,14 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
asset_name='Ether', asset_name='Ether',
amount=amount_to_send, amount=amount_to_send,
network_name=self.network) network_name=self.network)
self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'], # ToDo: Arbiscan API is down, looking for analogue
tx_time=device_time_before_sending) # self.network_api.wait_for_confirmation_of_transaction(address=self.sender['wallet_address'],
# tx_time=device_time_before_sending)
device_time_after_sending = self.wallet_1.driver.device_time device_time_after_sending = self.wallet_1.driver.device_time
self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender, # self._check_balances_after_tx(amount_to_send, sender_balance, receiver_balance, eth_amount_sender,
eth_amount_receiver) # eth_amount_receiver)
self._check_balances_after_tx(amount_to_send, None, None, eth_amount_sender, eth_amount_receiver)
# ToDo: enable when issues 20807 and 20808 are fixed # ToDo: enable when issues 20807 and 20808 are fixed
# self.loop.run_until_complete( # self.loop.run_until_complete(

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 KiB

View File

@ -490,25 +490,11 @@ class HomeView(BaseView):
def get_link_to_profile(self): def get_link_to_profile(self):
self.driver.info('Getting profile link via share profile QR') self.driver.info('Getting profile link via share profile QR')
self.show_qr_code_button.click() self.show_qr_code_button.click()
try:
element = self.link_to_profile_button.find_element()
except NoSuchElementException:
element = None
pass
self.share_profile_tab_button.click() self.share_profile_tab_button.click()
if element: self.link_to_profile_text.click()
self.wait_for_staleness_of_element(element) link_to_profile = self.driver.get_clipboard_text()
for _ in range(3):
try:
self.link_to_profile_button.click()
link_to_profile = self.sharing_text_native.text
break
except NoSuchElementException:
link_to_profile = ""
continue
if not link_to_profile: if not link_to_profile:
raise NoSuchElementException("Can't get link to profile") raise NoSuchElementException("Can't get link to profile")
self.click_system_back_button()
return link_to_profile return link_to_profile
def get_public_key(self): def get_public_key(self):