diff --git a/test/appium/tests/atomic/account_management/test_create_account.py b/test/appium/tests/atomic/account_management/test_create_account.py index 61288f4d5b..49688b18df 100644 --- a/test/appium/tests/atomic/account_management/test_create_account.py +++ b/test/appium/tests/atomic/account_management/test_create_account.py @@ -96,7 +96,8 @@ class TestCreateAccount(SingleDeviceTestCase): if sign_in.generate_key_button.is_element_displayed(): self.errors.append("Agree with ToS is not mandatory to proceed onboarding!") sign_in.accept_tos_checkbox.click() - sign_in.get_started_button.click() + sign_in.get_started_button.click_until_presence_of_element(sign_in.generate_key_button) + sign_in.generate_key_button.click() from views.sign_in_view import MultiAccountButton account_button = sign_in.get_multiaccount_by_position(position=random.randint(1, 4), element_class=MultiAccountButton) username = account_button.username.text diff --git a/test/appium/tests/atomic/account_management/test_profile.py b/test/appium/tests/atomic/account_management/test_profile.py index b8dcf9fdc2..ed3b8e6a4c 100644 --- a/test/appium/tests/atomic/account_management/test_profile.py +++ b/test/appium/tests/atomic/account_management/test_profile.py @@ -333,37 +333,25 @@ class TestProfileSingleDevice(SingleDeviceTestCase): @marks.testrail_id(5453) @marks.medium - @marks.flaky + # @marks.flaky def test_privacy_policy_terms_of_use_node_version_need_help_in_profile(self): signin = SignInView(self.driver) no_link_found_error_msg = 'Could not find privacy policy link at' no_link_open_error_msg = 'Could not open our privacy policy from' no_link_tos_error_msg = 'Could not open Terms of Use from' - signin.just_fyi("Checking privacy policy from sign in") + signin.just_fyi("Checking privacy policy and TOS links") if not signin.privacy_policy_link.is_element_present(): - self.driver.fail('%s Sign in view!' % no_link_found_error_msg) - web_page = signin.privacy_policy_link.click() - web_page.open_in_webview() - if not web_page.policy_summary.is_element_displayed(): - self.errors.append('%s Sign in view!' % no_link_open_error_msg) - web_page.close_privacy_policy_button.click() - - signin.just_fyi("Checking Terms of Use from sign") + self.errors.append('%s Sign in view!' % no_link_found_error_msg) if not signin.terms_of_use_link.is_element_displayed(): self.driver.fail("No Terms of Use link on Sign in view!") - web_page = signin.terms_of_use_link.click() - web_page.open_in_webview() - web_page.wait_for_d_aap_to_load() - web_page.swipe_by_custom_coordinates(0.5,0.8,0.5,0.4) - if not web_page.terms_of_use_summary.is_element_displayed(): - self.errors.append('%s Sign in view!' % no_link_tos_error_msg) - web_page.close_privacy_policy_button.click() home = signin.create_user() profile = home.profile_button.click() profile.about_button.click() profile.privacy_policy_button.click() + from views.web_views.base_web_view import BaseWebView + web_page = BaseWebView(self.driver) if not web_page.policy_summary.is_element_displayed(): self.errors.append('%s Profile about view!' % no_link_open_error_msg) web_page.click_system_back_button() @@ -896,26 +884,27 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): public_chat_1 = home_1.join_public_chat(public_chat_name) public_chat_1.relogin() - profile_1.just_fyi('check that still connected to custom mailserver after relogin') - home_1.profile_button.click() - profile_1.sync_settings_button.click() - if not profile_1.element_by_text(server_name).is_element_displayed(): - self.drivers[0].fail("Not connected to custom mailserver after re-login") - - profile_1.just_fyi('check that can RETRY to connect') - profile_1.element_by_translation_id(id='mailserver-error-title').wait_for_element(60) - public_chat_1.element_by_translation_id(id='mailserver-retry', uppercase=True).wait_and_click(60) - - profile_1.just_fyi('check that can pick another mailserver and receive messages') - profile_1.element_by_translation_id(id='mailserver-error-title').wait_for_element(60) - profile_1.element_by_translation_id(id='mailserver-pick-another', uppercase=True).wait_and_click(120) - mailserver = profile_1.return_mailserver_name(mailserver_ams, used_fleet) - profile_1.element_by_text(mailserver).click() - profile_1.confirm_button.click() - profile_1.home_button.click() - home_1.get_chat('#%s' % public_chat_name).click() - if not public_chat_1.chat_element_by_text(message).is_element_displayed(60): - self.errors.append("Chat history wasn't fetched") + # TODO: blocked due to 11786 + # profile_1.just_fyi('check that still connected to custom mailserver after relogin') + # home_1.profile_button.click() + # profile_1.sync_settings_button.click() + # if not profile_1.element_by_text(server_name).is_element_displayed(): + # self.drivers[0].fail("Not connected to custom mailserver after re-login") + # + # profile_1.just_fyi('check that can RETRY to connect') + # profile_1.element_by_translation_id(id='mailserver-error-title').wait_for_element(60) + # public_chat_1.element_by_translation_id(id='mailserver-retry', uppercase=True).wait_and_click(60) + # + # profile_1.just_fyi('check that can pick another mailserver and receive messages') + # profile_1.element_by_translation_id(id='mailserver-error-title').wait_for_element(60) + # profile_1.element_by_translation_id(id='mailserver-pick-another', uppercase=True).wait_and_click(120) + # mailserver = profile_1.return_mailserver_name(mailserver_ams, used_fleet) + # profile_1.element_by_text(mailserver).click() + # profile_1.confirm_button.click() + # profile_1.home_button.click() + # home_1.get_chat('#%s' % public_chat_name).click() + # if not public_chat_1.chat_element_by_text(message).is_element_displayed(60): + # self.errors.append("Chat history wasn't fetched") self.errors.verify_no_errors() diff --git a/test/appium/tests/atomic/chats/test_group_chat.py b/test/appium/tests/atomic/chats/test_group_chat.py index 18f6ded7dc..1b33b9c5a3 100644 --- a/test/appium/tests/atomic/chats/test_group_chat.py +++ b/test/appium/tests/atomic/chats/test_group_chat.py @@ -55,7 +55,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): device_2.just_fyi('Join to group chat, check system messages and send messages to group chat, check message status is delivered') device_2_chat.join_chat_button.click() for chat in (device_1_chat, device_2_chat): - if not chat.chat_element_by_text(join_system_message).is_element_displayed(): + if not chat.chat_element_by_text(join_system_message).is_element_displayed(30): self.drivers[0].fail('System message after joining group chat is not shown') device_2_chat.home_button.click(desired_view="home") message_1 = "Message from device: %s" % device_1_chat.driver.number diff --git a/test/appium/tests/atomic/transactions/test_keycard_wallet.py b/test/appium/tests/atomic/transactions/test_keycard_wallet.py index a69b5d5bc7..1fd4669f32 100644 --- a/test/appium/tests/atomic/transactions/test_keycard_wallet.py +++ b/test/appium/tests/atomic/transactions/test_keycard_wallet.py @@ -32,7 +32,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): @marks.testrail_id(6290) @marks.high def test_keycard_fetching_balance_after_offline(self): - sender = wallet_users['A'] + sender = transaction_senders['F'] sign_in_view = SignInView(self.driver) sign_in_view.just_fyi('Restore account with funds offline') diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index cb057c3e8a..49b6f38907 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -119,7 +119,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): sign_in_view.recover_access(sender['passphrase']) home_view = sign_in_view.get_home_view() wallet_view = home_view.wallet_button.click() - wallet_view.set_up_wallet() + wallet_view.wait_balance_is_changed(asset='ADI', scan_tokens=True) wallet_view.accounts_status_account.click() amount = '0.000%s' % str(random.randint(100, 999)) + '1' wallet_view.send_transaction(amount=amount, @@ -137,6 +137,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): sign_in_view.recover_access(sender['passphrase']) wallet_view = sign_in_view.wallet_button.click() wallet_view.set_up_wallet() + [wallet_view.wait_balance_is_changed(asset) for asset in ['ETH', 'STT']] eth_value = wallet_view.get_asset_amount_by_name('ETH') stt_value = wallet_view.get_asset_amount_by_name('STT') if eth_value == 0 or stt_value == 0: @@ -338,6 +339,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): sign_in_view = SignInView(self.driver) sign_in_view.recover_access(transaction_senders['C']['passphrase']) wallet_view = sign_in_view.wallet_button.click() + wallet_view.wait_balance_is_changed() send_transaction_view = SendTransactionView(self.driver) sign_in_view.just_fyi("Setting up wallet") diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 7d1b9eb824..1df3f94399 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -259,11 +259,15 @@ class GroupChatInfoView(BaseView): return UsernameOptions(self.driver, username) def user_admin(self, username: str): - return Button(self.driver, + admin = Button(self.driver, xpath="//*[@text='%s']/..//*[@text='%s']" % (username, self.get_translation_by_key("group-chat-admin"))) + admin.scroll_to_element() + return admin def get_user_from_group_info(self, username: str): - return Text(self.driver, xpath="//*[@text='%s']" % username) + user = Text(self.driver, xpath="//*[@text='%s']" % username) + user.scroll_to_element() + return user class PreviewMessage(ChatElementByText): diff --git a/test/appium/views/wallet_view.py b/test/appium/views/wallet_view.py index c6705ff185..2163e6f155 100644 --- a/test/appium/views/wallet_view.py +++ b/test/appium/views/wallet_view.py @@ -160,13 +160,12 @@ class WalletView(BaseView): self.wallet_button.double_click() counter += 10 time.sleep(10) - if scan_tokens: - self.scan_tokens() self.driver.info('*Waiting %ss for %s updated balance*' % (counter,asset)) elif not self.asset_by_name(asset).is_element_present(10): + if scan_tokens: + self.scan_tokens() counter += 10 time.sleep(10) - self.swipe_up() self.driver.info('*Waiting %s seconds for %s to display asset*' % (counter, asset)) else: self.driver.info('**Balance is updated!**')