From 413960682a3c64440dc87a8b779a9514b7cd1819 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Wed, 28 Jul 2021 14:42:06 +0200 Subject: [PATCH] e2e: remaining fixes Signed-off-by: Churikova Tetiana --- test/appium/tests/atomic/chats/test_public.py | 1 + .../transactions/test_keycard_wallet.py | 43 +++++++++---------- .../tests/atomic/transactions/test_wallet.py | 2 +- test/appium/views/profile_view.py | 1 + 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/test/appium/tests/atomic/chats/test_public.py b/test/appium/tests/atomic/chats/test_public.py index 68d349e880..74d6d3b990 100644 --- a/test/appium/tests/atomic/chats/test_public.py +++ b/test/appium/tests/atomic/chats/test_public.py @@ -86,6 +86,7 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase): chat_2 = home_2.get_chat_view() chat_2.select_mention_from_suggestion_list(username_1, username_1[:2]) chat_2.send_message_button.click() + chat_element.new_messages_counter.wait_for_element(30) if chat_element.new_messages_counter.text == '1': self.errors.append('Counter is not shown for mention in public chat') diff --git a/test/appium/tests/atomic/transactions/test_keycard_wallet.py b/test/appium/tests/atomic/transactions/test_keycard_wallet.py index 1fd4669f32..360cd0950d 100644 --- a/test/appium/tests/atomic/transactions/test_keycard_wallet.py +++ b/test/appium/tests/atomic/transactions/test_keycard_wallet.py @@ -33,36 +33,35 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): @marks.high def test_keycard_fetching_balance_after_offline(self): sender = transaction_senders['F'] - sign_in_view = SignInView(self.driver) + sign_in = SignInView(self.driver) - sign_in_view.just_fyi('Restore account with funds offline') - sign_in_view.toggle_airplane_mode() - sign_in_view.recover_access(sender['passphrase'], keycard=True) - home_view = sign_in_view.get_home_view() - wallet_view = home_view.wallet_button.click() - wallet_view.set_up_wallet() + sign_in.just_fyi('Restore account with funds offline') + sign_in.toggle_airplane_mode() + home = sign_in.recover_access(sender['passphrase'], keycard=True) - sign_in_view.just_fyi('Go back to online and check that balance is updated') - sign_in_view.toggle_airplane_mode() - wallet_view.wait_balance_is_changed('ETH') - wallet_view.wait_balance_is_changed('STT') + sign_in.just_fyi('Go back to online and check that balance is updated') + sign_in.toggle_airplane_mode() - sign_in_view.just_fyi('Send some tokens to other account') + home.connection_offline_icon.wait_for_invisibility_of_element(100) + wallet = home.wallet_button.click() + wallet.wait_balance_is_changed('ETH') + wallet.wait_balance_is_changed('STT') + + sign_in.just_fyi('Send some tokens to other account') recipient = "0x" + basic_user['address'] - sending_amount = wallet_view.get_unique_amount() + sending_amount = wallet.get_unique_amount() asset = 'STT' - wallet_view.accounts_status_account.click_until_presence_of_element(wallet_view.send_transaction_button) - initial_amount_STT = wallet_view.get_asset_amount_by_name('STT') - wallet_view.send_transaction(asset_name=asset, amount=sending_amount, recipient=recipient, + wallet.accounts_status_account.click_until_presence_of_element(wallet.send_transaction_button) + initial_amount_STT = wallet.get_asset_amount_by_name('STT') + wallet.send_transaction(asset_name=asset, amount=sending_amount, recipient=recipient, sign_transaction=True, keycard=True) - sign_in_view.toggle_airplane_mode() + sign_in.toggle_airplane_mode() self.network_api.wait_for_confirmation_of_transaction(basic_user['address'], sending_amount, token=True) - sign_in_view.just_fyi('Change that balance is updated and transaction is appeared in history') - - sign_in_view.toggle_airplane_mode() - wallet_view.wait_balance_is_changed('STT', initial_amount_STT) - wallet_view.find_transaction_in_history(amount=sending_amount, asset='STT') + sign_in.just_fyi('Change that balance is updated and transaction is appeared in history') + sign_in.toggle_airplane_mode() + wallet.wait_balance_is_changed('STT', initial_amount_STT) + wallet.find_transaction_in_history(amount=sending_amount, asset='STT') @marks.testrail_id(6291) @marks.critical diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index 14bfb1ad68..ecf19bbf4e 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -177,7 +177,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): wallet.set_up_wallet() for asset in ('ETH', 'MDS', 'STT'): wallet.wait_balance_is_changed(asset) - wallet.accounts_status_account.scroll_to_element(direction='up') + wallet.swipe_up() wallet.accounts_status_account.click() transaction = wallet.transaction_history_button.click() if not wallet.element_by_translation_id("transactions-history-empty").is_element_displayed(): diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index f83c5a6a62..56d22f3b86 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -388,6 +388,7 @@ class ProfileView(BaseView): ## take by Photo self.take_photo() self.click_system_back_button() + self.profile_picture.click() self.take_photo() self.accept_photo_button.click() self.crop_photo_button.click()