From f7d7c282cd919e095bdd536120c642c11d430c85 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Mon, 9 Nov 2020 16:27:43 +0100 Subject: [PATCH] nightly e2e fixes Signed-off-by: Churikova Tetiana --- test/appium/tests/atomic/chats/test_group_chat.py | 2 +- .../tests/atomic/dapps_and_browsing/test_dapps.py | 3 +-- test/appium/views/base_view.py | 12 ++++++++---- test/appium/views/transactions_view.py | 3 +++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/test/appium/tests/atomic/chats/test_group_chat.py b/test/appium/tests/atomic/chats/test_group_chat.py index 7ba99391c2..ceb6620767 100644 --- a/test/appium/tests/atomic/chats/test_group_chat.py +++ b/test/appium/tests/atomic/chats/test_group_chat.py @@ -253,7 +253,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): chat_name = devices_home[0].get_random_chat_name() - devices_chat[0].just_fyi('Create group chats without members') + devices_home[0].just_fyi('Create group chats without members') devices_chat[0] = devices_home[0].create_group_chat([], chat_name) link = devices_chat[0].get_group_invite_via_group_info() devices_chat[0].get_back_to_home_view() diff --git a/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py b/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py index 9bb672e30d..771b943f5b 100644 --- a/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py +++ b/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py @@ -93,7 +93,7 @@ class TestDApps(SingleDeviceTestCase): if not status_test_dapp.element_by_text(account_name).is_element_displayed(): self.errors.append("No expected account %s is shown in authorize web3 popup for wallet" % account_name) status_test_dapp.allow_button.wait_and_click() - dapp_view.profile_button.click() + dapp_view.profile_button.click(desired_element_text='DApp permissions') profile_view.element_by_text(test_dapp_name).click() for text in 'Chat key', account_name: if not dapp_view.element_by_text(text).is_element_displayed(): @@ -110,7 +110,6 @@ class TestDApps(SingleDeviceTestCase): sign_in_view.just_fyi('Relogin and check multiaccount loads fine') send_transaction_view.cancel_button.click() sign_in_view.profile_button.click() - sign_in_view.get_back_to_home_view() sign_in_view.relogin() sign_in_view.wallet_button.click() if not wallet_view.element_by_text(account_name).is_element_displayed(): diff --git a/test/appium/views/base_view.py b/test/appium/views/base_view.py index f3d8a536bb..1a3e3f5bad 100644 --- a/test/appium/views/base_view.py +++ b/test/appium/views/base_view.py @@ -149,8 +149,8 @@ class DappTabButton(TabButton): return DappsView(self.driver) def click(self): - from views.dapps_view import EnterUrlEditbox - self.click_until_presence_of_element(EnterUrlEditbox(self.driver)) + from views.dapps_view import SelectAccountButton + self.click_until_presence_of_element(SelectAccountButton(self.driver)) return self.navigate() @@ -179,9 +179,13 @@ class ProfileButton(TabButton): from views.profile_view import ProfileView return ProfileView(self.driver) - def click(self): + def click(self, desired_element_text = 'privacy'): from views.profile_view import PrivacyAndSecurityButton - self.click_until_presence_of_element(PrivacyAndSecurityButton(self.driver)) + if desired_element_text == 'privacy': + self.click_until_presence_of_element(PrivacyAndSecurityButton(self.driver)) + else: + base_view = BaseView(self.driver) + self.click_until_presence_of_element(base_view.element_by_text_part(desired_element_text)) return self.navigate() diff --git a/test/appium/views/transactions_view.py b/test/appium/views/transactions_view.py index 3b54b43ae5..719c29946f 100644 --- a/test/appium/views/transactions_view.py +++ b/test/appium/views/transactions_view.py @@ -10,6 +10,9 @@ class OptionsButton(BaseButton): self.locator = self.Locator.xpath_selector( '(//android.view.ViewGroup[@content-desc="icon"])[2]') + def click(self): + self.click_until_presence_of_element(OptionsButton.CopyTransactionHashButton(self.driver)) + class CopyTransactionHashButton(BaseButton): def __init__(self, driver): super(OptionsButton.CopyTransactionHashButton, self).__init__(driver)