From 976f58606cec67cdb3e43d86f621d7c976148b73 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Thu, 25 Aug 2022 12:49:51 +0200 Subject: [PATCH] e2e: fixes --- test/appium/tests/critical/wallet_and_tx/test_wallet.py | 1 + test/appium/tests/medium/test_single_device.py | 3 +-- test/appium/views/base_view.py | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/test/appium/tests/critical/wallet_and_tx/test_wallet.py b/test/appium/tests/critical/wallet_and_tx/test_wallet.py index 0fb836b17a..d26a5c7783 100644 --- a/test/appium/tests/critical/wallet_and_tx/test_wallet.py +++ b/test/appium/tests/critical/wallet_and_tx/test_wallet.py @@ -129,6 +129,7 @@ class TestWalletManagementDeviceMerged(MultipleSharedDeviceTestCase): self.sign_in.just_fyi("Check that 0 asset is not disappearing after relogin") self.wallet.reopen_app() + self.home.continue_syncing_button.click_if_shown(5) self.sign_in.wallet_button.click() self.wallet.asset_by_name(asset).scroll_to_element() diff --git a/test/appium/tests/medium/test_single_device.py b/test/appium/tests/medium/test_single_device.py index 1383406b0b..43a7d5c913 100644 --- a/test/appium/tests/medium/test_single_device.py +++ b/test/appium/tests/medium/test_single_device.py @@ -906,10 +906,9 @@ class TestChatManagement(SingleDeviceTestCase): profile.close_button.click() if not profile.element_by_text(h_node).is_element_displayed(): self.errors.append('"%s" history node is not pinned' % h_node) - profile.home_button.click() profile.just_fyi('Relogin and check that settings are preserved') - home.relogin() + home.reopen_app() home.profile_button.click() profile.sync_settings_button.click() if not profile.element_by_text(h_node).is_element_displayed(): diff --git a/test/appium/views/base_view.py b/test/appium/views/base_view.py index 32801bfe85..2852945706 100644 --- a/test/appium/views/base_view.py +++ b/test/appium/views/base_view.py @@ -538,16 +538,14 @@ class BaseView(object): def get_back_to_home_view(self, times_to_click_on_back_btn=3): counter = 0 - while self.back_button.is_element_displayed(2) or self.close_button.is_element_displayed(2) or self.navigate_up_button.is_element_displayed(2): + while self.back_button.is_element_displayed(2) or self.navigate_up_button.is_element_displayed(2): try: if counter >= times_to_click_on_back_btn: break if self.back_button.is_element_displayed(2): - self.back_button.click_until_presence_of_element(self.home_button) - elif self.close_button.is_element_displayed(2): - self.close_button.click_until_presence_of_element(self.home_button) + self.back_button.click_until_absense_of_element(self.back_button) else: - self.navigate_up_button.click_until_presence_of_element(self.home_button) + self.navigate_up_button.click_until_absense_of_element(self.navigate_up_button) counter += 1 except (NoSuchElementException, TimeoutException): continue