From d15860c93ef08e7c4e41c40e676436407bfe6288 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Mon, 9 Aug 2021 13:16:02 +0200 Subject: [PATCH] e2e: nightly fix Signed-off-by: andrey --- test/appium/tests/__init__.py | 1 + test/appium/tests/atomic/chats/test_chats_management.py | 6 +++--- test/appium/tests/atomic/chats/test_public.py | 3 +-- test/appium/views/home_view.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/appium/tests/__init__.py b/test/appium/tests/__init__.py index f837a81431..3157a19f4d 100644 --- a/test/appium/tests/__init__.py +++ b/test/appium/tests/__init__.py @@ -35,6 +35,7 @@ unique_password = 'unique' + get_current_time() pin = '121212' puk = '000000000000' pair_code= '000000' +background_service_message = 'Background service for notifications' bootnode_address = "enode://a8a97f126f5e3a340cb4db28a1187c325290ec08b2c9a6b1f19845ac86c46f9fac2ba13328822590" \ "fd3de3acb09cc38b5a05272e583a2365ad1fa67f66c55b34@167.99.210.203:30404" diff --git a/test/appium/tests/atomic/chats/test_chats_management.py b/test/appium/tests/atomic/chats/test_chats_management.py index 90d3e329fa..723a9783de 100644 --- a/test/appium/tests/atomic/chats/test_chats_management.py +++ b/test/appium/tests/atomic/chats/test_chats_management.py @@ -2,7 +2,7 @@ import time import random import emoji -from tests import marks +from tests import marks, background_service_message from tests.users import basic_user, dummy_user, ens_user_ropsten, ens_user, ens_user_message_sender from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase from views.sign_in_view import SignInView @@ -700,7 +700,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase): device_1.open_notification_bar() if device_1.element_by_text_part(message_after_block_2).is_element_displayed(): self.errors.append("Push notification is received from blocked user") - device_1.element_by_text_part("Background service for notifications").click() + device_1.element_by_text_part(background_service_message).click() if public_chat_after_block_1.chat_element_by_text(message_after_block_2).is_element_displayed(): self.errors.append("Message from blocked user '%s' is received" % device_2.driver.number) @@ -739,7 +739,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase): device_1.just_fyi("check that PNs are still enabled in profile after closing 'background notification centre' " "message and relogin") device_1.open_notification_bar() - if not device_1.element_by_text_part("Background notification service").is_element_displayed(): + if not device_1.element_by_text_part(background_service_message).is_element_displayed(): self.errors.append("Background notification service is not started after relogin") self.errors.verify_no_errors() diff --git a/test/appium/tests/atomic/chats/test_public.py b/test/appium/tests/atomic/chats/test_public.py index 084bca23a1..60fa4b8e13 100644 --- a/test/appium/tests/atomic/chats/test_public.py +++ b/test/appium/tests/atomic/chats/test_public.py @@ -88,8 +88,7 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase): 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') + chat_element.new_messages_counter.wait_for_element_text("1", 60) chat_element.click() home_1.home_button.double_click() diff --git a/test/appium/views/home_view.py b/test/appium/views/home_view.py index a879d2c4d4..8ec4734d25 100644 --- a/test/appium/views/home_view.py +++ b/test/appium/views/home_view.py @@ -211,8 +211,8 @@ class HomeView(BaseView): if set_image: from views.profile_view import ProfileView set_picture_view = ProfileView(self.driver) - set_picture_view.element_by_translation_id("community-thumbnail-upload").click() - set_picture_view.element_by_translation_id("community-image-pick").click() + set_picture_view.element_by_translation_id("community-thumbnail-upload").scroll_and_click() + set_picture_view.element_by_translation_id("community-image-pick").scroll_and_click() set_picture_view.select_photo_from_gallery(file_name) set_picture_view.crop_photo_button.click()