From b5781a7a830c2cf43bf8f393b2022b69eab9d666 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Wed, 15 Mar 2023 16:44:13 +0100 Subject: [PATCH] e2e: minor fixes --- test/appium/requirements.txt | 2 +- test/appium/tests/medium/test_activity_center.py | 3 ++- test/appium/views/home_view.py | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/appium/requirements.txt b/test/appium/requirements.txt index e9795c9a37..5d093f5210 100644 --- a/test/appium/requirements.txt +++ b/test/appium/requirements.txt @@ -1,7 +1,7 @@ aiohttp==3.8.1 allpairspy==2.5.0 apipkg==1.5 -Appium-Python-Client==1.0.2 +Appium-Python-Client==1.3.0 PyGithub==1.55 async-timeout==4.0.1 certifi==2020.11.8 diff --git a/test/appium/tests/medium/test_activity_center.py b/test/appium/tests/medium/test_activity_center.py index dd0b784a10..324e780b4e 100644 --- a/test/appium/tests/medium/test_activity_center.py +++ b/test/appium/tests/medium/test_activity_center.py @@ -259,11 +259,12 @@ class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase): self.channel_2.send_message(reply_to_message_from_sender) self.home_1.just_fyi("Checking unread indicators") + self.home_1.notifications_unread_badge.wait_for_visibility_of_element(120) community_element_1 = self.home_1.get_chat(self.community_name, community=True) for unread_counter in community_element_1.new_messages_counter, self.home_1.communities_tab.counter: if not unread_counter.is_element_displayed(60): self.errors.append('New message counter badge is not shown!') - if unread_counter.text != '1': + if int(unread_counter.text) != 1: self.errors.append('New message counter badge is not 1, it is %s!' % unread_counter.text) self.home_1.just_fyi("Checking reply attributes in activity center") diff --git a/test/appium/views/home_view.py b/test/appium/views/home_view.py index 4553aeecb4..bfe64d514e 100644 --- a/test/appium/views/home_view.py +++ b/test/appium/views/home_view.py @@ -321,6 +321,9 @@ class HomeView(BaseView): chat = self.get_chat_view() chat.public_key_edit_box.click() chat.public_key_edit_box.send_keys(public_key) + chat.element_by_translation_id("user-found").wait_for_visibility_of_element() + if not chat.view_profile_new_contact_button.is_element_displayed(): + chat.click_system_back_button() chat.view_profile_new_contact_button.click_until_presence_of_element(chat.profile_block_contact_button) if remove_from_contacts and chat.profile_remove_from_contacts.is_element_displayed(): chat.profile_remove_from_contacts.click() @@ -360,6 +363,9 @@ class HomeView(BaseView): self.add_a_contact_chat_bottom_sheet_button.click() chat.public_key_edit_box.click() chat.public_key_edit_box.send_keys(key) + chat.element_by_translation_id("user-found").wait_for_visibility_of_element() + if not chat.view_profile_new_contact_button.is_element_displayed(): + chat.click_system_back_button() chat.view_profile_new_contact_button.click_until_presence_of_element(chat.profile_add_to_contacts_button) chat.profile_add_to_contacts_button.click() self.click_system_back_button_until_element_is_shown()