e2e: fixes for activity center and some more

This commit is contained in:
Yevheniia Berdnyk 2024-05-14 23:13:02 +03:00
parent 0145429852
commit 634dd74768
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
4 changed files with 22 additions and 6 deletions

View File

@ -50,7 +50,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
closed_community_urls = {
"https://status.app/c/G0IAAGRy3S0pLm1NeQ91pwKgFaFGoIlkxXmDxITXXi3KdZ7vpb9-ERczhqwoFwMK6sCPnKwA#zQ3shtJ8A3rxUZWcfWDL3vKYQBt3jMPTuf44dJUGfjZjsek66":
"e2e community token-gated",
"https://status.app/c/G1AAAGR0G-IRb2YJD4lRXwLusAFnGrDHGNl6Wt55MIARwVYvarnO873011-fdVSz1kHSan-qq0G96vOaMqyTRhJnQV74KCUr#zQ3shb9irJR66rhG1E8sQZX8pDU3dpGm4daYSmPVDd2e73ewE":
"https://status.app/c/GzwAAGS9TbI9CiYaoZj0TRNelWAPwk8gSHIEmqgqb0ADPw5rnFvk6bp_n3BlZxVMshmxFyI=#zQ3shkrmSmwb66sw2EuUvC5iqiNqEeevTfjtks3p8ZaaCYoNj":
"Open community for e2e",
"https://status.app/c/GzAAAORtwyW4xNWM4td0F7hOnYZ1apSqCCRUUR0qxD19n3Ec97fX_aIVIGFWbdUM#zQ3shk6dgK8dYWWSC4m8Jj5c91zyfhfj1fFkgypS8D9gsXkrK":
"Closed community"
@ -96,7 +96,7 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
community_links = {
"status.app://c/G0IAAGRy3S0pLm1NeQ91pwKgFaFGoIlkxXmDxITXXi3KdZ7vpb9-ERczhqwoFwMK6sCPnKwA#zQ3shtJ8A3rxUZWcfWDL3vKYQBt3jMPTuf44dJUGfjZjsek66":
"e2e community token-gated",
"status.app://c/G1AAAGR0G-IRb2YJD4lRXwLusAFnGrDHGNl6Wt55MIARwVYvarnO873011-fdVSz1kHSan-qq0G96vOaMqyTRhJnQV74KCUr#zQ3shb9irJR66rhG1E8sQZX8pDU3dpGm4daYSmPVDd2e73ewE":
"status.app://c/GzwAAGS9TbI9CiYaoZj0TRNelWAPwk8gSHIEmqgqb0ADPw5rnFvk6bp_n3BlZxVMshmxFyI=#zQ3shkrmSmwb66sw2EuUvC5iqiNqEeevTfjtks3p8ZaaCYoNj":
"Open community for e2e",
"status.app://c/GzAAAORtwyW4xNWM4td0F7hOnYZ1apSqCCRUUR0qxD19n3Ec97fX_aIVIGFWbdUM#zQ3shk6dgK8dYWWSC4m8Jj5c91zyfhfj1fFkgypS8D9gsXkrK":
"Closed community"

View File

@ -7,7 +7,7 @@ from selenium.common import TimeoutException
from base_test_case import MultipleSharedDeviceTestCase, create_shared_drivers
from support.api.network_api import NetworkApi
from tests import marks, run_in_parallel
from users import transaction_recipients
from users import recovery_users
from views.sign_in_view import SignInView
@ -20,7 +20,9 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
self.network_api = NetworkApi()
self.drivers, self.loop = create_shared_drivers(2)
self.sign_in_1, self.sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
self.sender, self.receiver = transaction_recipients['J'], transaction_recipients['K']
passphrases, addresses = list(recovery_users), list(recovery_users.values())
self.sender = {'passphrase': passphrases[0], 'address': addresses[0]}
self.receiver = {'passphrase': passphrases[1], 'address': addresses[1]}
self.sender_username, self.receiver_username = 'sender', 'receiver'
self.loop.run_until_complete(
run_in_parallel(((self.sign_in_1.recover_access, {'passphrase': self.sender['passphrase'],
@ -66,7 +68,7 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
exp_amount = round(initial_eth_amount + amount_to_send, 4)
# for _ in range(12): # ToDo: 120 sec wait time, enable when autoupdate feature is ready
wallet_view.wallet_tab.click()
wallet_view.wallet_tab.wait_and_click()
new_eth_amount = round(wallet_view.get_asset(asset_name='Ether').get_amount(), 4)
if user_name == 'sender' and new_eth_amount <= exp_amount:
return
@ -77,7 +79,7 @@ class TestWalletMultipleDevice(MultipleSharedDeviceTestCase):
self.errors.append(
"Eth amount in the %ss wallet is %s but should be %s" % (user_name, new_eth_amount, exp_amount))
# ToDo: disable relogin when autoupdate feature ia ready
# ToDo: disable relogin when autoupdate feature is ready
self.home_1.just_fyi("Relogin for getting an updated balance")
self.home_2.just_fyi("Relogin for getting an updated balance")
for _ in range(6): # just waiting 1 minute here to be sure that balances are updated
@ -187,6 +189,7 @@ class TestWalletOneDevice(MultipleSharedDeviceTestCase):
self.wallet_view.just_fyi("Adding new watch only account")
new_account_name = "Account to watch"
address_to_watch = "0x8d2413447ff297d30bdc475f6d5cb00254685aae"
self.wallet_view.navigate_back_to_wallet_view()
self.wallet_view.add_watch_only_account(address=address_to_watch, account_name=new_account_name)
if self.wallet_view.account_name_text.text != new_account_name:

View File

@ -447,6 +447,18 @@ class BaseView(object):
counter += 1
self.driver.info("Could not reach chat view by pressing system back button")
def navigate_back_to_wallet_view(self, attempts=3):
counter = 0
element = self.get_wallet_view().network_drop_down
while not element.is_element_displayed(1) and counter <= attempts:
self.driver.press_keycode(4)
try:
element.wait_for_element(2)
return
except (NoSuchElementException, TimeoutException):
counter += 1
self.driver.info("Could not reach wallet view by pressing system back button")
def get_app_from_background(self):
self.driver.info('Get Status back from Recent apps')
self.driver.press_keycode(187)

View File

@ -32,6 +32,7 @@ class WalletView(BaseView):
def __init__(self, driver):
super().__init__(driver)
# Wallet view
self.network_drop_down = Button(self.driver, accessibility_id='network-dropdown')
self.collectibles_tab = Button(self.driver, accessibility_id='Collectibles')
self.add_account_button = Button(self.driver, accessibility_id='add-account')