From 3692ad38dd12dbe864dc7e7da12593be4fbc2638 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Mon, 30 Jan 2023 18:18:00 +0100 Subject: [PATCH] e2e: fixes compressed keys --- .../tests/critical/chats/test_1_1_public_chats.py | 14 +------------- test/appium/views/chat_view.py | 1 + test/appium/views/profile_view.py | 3 ++- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/test/appium/tests/critical/chats/test_1_1_public_chats.py b/test/appium/tests/critical/chats/test_1_1_public_chats.py index 29c553a3fe..1d9c1132b8 100644 --- a/test/appium/tests/critical/chats/test_1_1_public_chats.py +++ b/test/appium/tests/critical/chats/test_1_1_public_chats.py @@ -1179,24 +1179,12 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase): if self.chat_2.chat_element_by_text(message).member_photo.is_element_displayed(): self.errors.append('%s is not stack to 1st(they are sent in less than 5 minutes)!' % message) - self.chat_1.just_fyi("Sending message while user is still not in contacts") + self.chat_1.just_fyi("Sending message") message = 'profile_photo' self.chat_1.send_message(message) self.chat_2.chat_element_by_text(message).wait_for_visibility_of_element(30) - # Should be checked in CR flow, as for now no way to start chat with user until he is added to contacts - # if not self.chat_2.chat_element_by_text(message).member_photo.is_element_differs_from_template("member2.png", - # diff=5): - # self.errors.append("Image of user in 1-1 chat is updated even when user is not added to contacts!") - - self.chat_1.just_fyi("Users add to contacts each other") - [home.click_system_back_button_until_element_is_shown() for home in (self.home_1, self.home_2)] - [home.browser_tab.click() for home in (self.home_1, self.home_2)] - self.profile_1.add_contact_via_contacts_list(self.public_key_2) - self.profile_2 = self.home_2.get_profile_view() - self.profile_2.add_contact_via_contacts_list(self.public_key_1) self.chat_1.just_fyi("Go back to chat view and checking that profile photo is updated") - [home.chats_tab.click() for home in (self.home_1, self.home_2)] if not self.chat_2.chat_message_input.is_element_displayed(): self.home_2.get_chat(self.default_username_1).click() if self.chat_2.chat_element_by_text(message).member_photo.is_element_differs_from_template("member3.png", diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 40d18e0bda..41ffcbbcf7 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -611,6 +611,7 @@ class ChatView(BaseView): # Start new chat self.public_key_edit_box = EditBox(self.driver, accessibility_id="enter-contact-code-input") self.scan_contact_code_button = Button(self.driver, accessibility_id="scan-contact-code-button") + self.view_profile_new_contact_button = Button(self.driver, accessibility_id="new-contact-button") # Chat header self.user_name_text = Text(self.driver, accessibility_id="chat-name-text") diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index b82848f500..bf61436cdb 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -369,7 +369,8 @@ class ProfileView(BaseView): chat = self.get_chat_view() chat.public_key_edit_box.click() chat.public_key_edit_box.send_keys(public_key) - chat.confirm_until_presence_of_element(self.add_new_contact_button) + chat.view_profile_new_contact_button.click_until_presence_of_element(chat.profile_add_to_contacts) + chat.profile_add_to_contacts.click() self.click_system_back_button_until_element_is_shown() def switch_push_notifications(self):