e2e: removed jump-to from tests

This commit is contained in:
Yevheniia Berdnyk 2024-05-22 19:19:15 +03:00
parent a63ea3290e
commit 76a61bc56c
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
7 changed files with 52 additions and 45 deletions

View File

@ -38,4 +38,3 @@ SHOW_NOT_IMPLEMENTED_FEATURES=1
DELETE_MESSAGE_FOR_ME_UNDO_TIME_LIMIT=10000 DELETE_MESSAGE_FOR_ME_UNDO_TIME_LIMIT=10000
DELETE_MESSAGE_UNDO_TIME_LIMIT=10000 DELETE_MESSAGE_UNDO_TIME_LIMIT=10000
ENABLE_ALERT_BANNER=0 ENABLE_ALERT_BANNER=0
ENABLE_JUMP_TO=1

View File

@ -257,14 +257,6 @@ class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase):
self.home_1.add_contact(self.public_key_2) self.home_1.add_contact(self.public_key_2)
self.home_2.handle_contact_request(self.username_1) self.home_2.handle_contact_request(self.username_1)
self.text_message = 'hello' self.text_message = 'hello'
self.one_to_one_message = 'one-t-one message'
self.home_2.just_fyi("Send message to contact (need for jump to) test")
self.chat_1 = self.home_1.get_chat(self.username_2).click()
self.chat_1.send_message(self.one_to_one_message)
self.chat_2 = self.home_2.get_chat(self.username_1).click()
self.chat_2.send_message(self.text_message)
[home.navigate_back_to_home_view() for home in self.homes]
self.home_1.just_fyi("Open community to message") self.home_1.just_fyi("Open community to message")
self.home_1.communities_tab.click() self.home_1.communities_tab.click()
@ -283,6 +275,7 @@ class TestActivityMultipleDevicePR(MultipleSharedDeviceTestCase):
self.channel_2 = self.community_2.get_channel(self.channel_name).click() self.channel_2 = self.community_2.get_channel(self.channel_name).click()
@marks.testrail_id(702936) @marks.testrail_id(702936)
@marks.skip("The feature is disabled")
def test_navigation_jump_to(self): def test_navigation_jump_to(self):
self.community_1.just_fyi("Check Jump to screen and redirect on tap") self.community_1.just_fyi("Check Jump to screen and redirect on tap")
self.community_1.click_on_floating_jump_to() self.community_1.click_on_floating_jump_to()

View File

@ -181,7 +181,9 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
@marks.testrail_id(702731) @marks.testrail_id(702731)
def test_1_1_chat_pin_messages(self): def test_1_1_chat_pin_messages(self):
self.home_1.just_fyi("Check that Device1 can pin own message in 1-1 chat") self.home_1.just_fyi("Check that Device1 can pin own message in 1-1 chat")
self.chat_2.jump_to_card_by_text(self.username_1) self.chat_2.navigate_back_to_home_view()
self.home_2.chats_tab.click()
self.home_2.get_chat(self.username_1).click()
self.chat_1.send_message(self.message_1) self.chat_1.send_message(self.message_1)
self.chat_1.send_message(self.message_2) self.chat_1.send_message(self.message_2)
self.chat_1.chat_element_by_text(self.message_1).wait_for_status_to_be("Delivered") self.chat_1.chat_element_by_text(self.message_1).wait_for_status_to_be("Delivered")
@ -274,14 +276,14 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
self.profile_1.edit_profile_picture(image_index=2) self.profile_1.edit_profile_picture(image_index=2)
self.chat_2.just_fyi("Send messages with non-latin symbols") self.chat_2.just_fyi("Send messages with non-latin symbols")
# self.home_1.jump_to_card_by_text(self.username_2)
self.home_1.click_system_back_button() self.home_1.click_system_back_button()
self.home_1.chats_tab.click() self.home_1.chats_tab.click()
self.home_1.get_chat(self.username_2).click() self.home_1.get_chat(self.username_2).click()
self.chat_1.send_message("just a text") # Sending a message here so the next ones will be in a separate line self.chat_1.send_message("just a text") # Sending a message here so the next ones will be in a separate line
self.home_2.navigate_back_to_home_view() self.home_2.navigate_back_to_home_view()
self.home_2.jump_to_card_by_text(self.username_1) self.home_2.chats_tab.click()
self.home_2.get_chat(self.username_1).click()
messages = ['hello', '¿Cómo estás tu año?', 'ё, доброго вечерочка', '® æ ç ♥'] messages = ['hello', '¿Cómo estás tu año?', 'ё, доброго вечерочка', '® æ ç ♥']
for message in messages: for message in messages:
self.chat_2.send_message(message) self.chat_2.send_message(message)
@ -371,10 +373,11 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
@marks.testrail_id(702855) @marks.testrail_id(702855)
def test_1_1_chat_edit_message(self): def test_1_1_chat_edit_message(self):
self.home_1.navigate_back_to_home_view() for home in self.homes:
self.home_2.navigate_back_to_home_view() home.navigate_back_to_home_view()
self.chat_2.jump_to_card_by_text(self.username_1) home.chats_tab.click()
self.chat_1.jump_to_card_by_text(self.username_2) self.home_2.get_chat(self.username_1).click()
self.home_1.get_chat(self.username_2).click()
self.device_2.just_fyi( self.device_2.just_fyi(
"Device 2 sends text message and edits it in 1-1 chat. Device 2 checks edited message is shown") "Device 2 sends text message and edits it in 1-1 chat. Device 2 checks edited message is shown")
@ -399,9 +402,13 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
@marks.testrail_id(703391) @marks.testrail_id(703391)
def test_1_1_chat_send_image_save_and_share(self): def test_1_1_chat_send_image_save_and_share(self):
if not self.chat_2.chat_message_input.is_element_displayed(): if not self.chat_2.chat_message_input.is_element_displayed():
self.chat_2.jump_to_card_by_text(self.username_1) self.chat_2.navigate_back_to_home_view()
self.home_2.chats_tab.click()
self.home_2.get_chat(self.username_1).click()
if not self.chat_1.chat_message_input.is_element_displayed(): if not self.chat_1.chat_message_input.is_element_displayed():
self.chat_1.jump_to_card_by_text(self.username_2) self.chat_1.navigate_back_to_home_view()
self.home_1.chats_tab.click()
self.home_1.get_chat(self.username_2).click()
self.chat_1.just_fyi("Device 1 sends an image") self.chat_1.just_fyi("Device 1 sends an image")
image_description = "test image" image_description = "test image"
@ -460,9 +467,13 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
@marks.testrail_id(702733) @marks.testrail_id(702733)
def test_1_1_chat_text_message_delete_push_disappear(self): def test_1_1_chat_text_message_delete_push_disappear(self):
if not self.chat_2.chat_message_input.is_element_displayed(): if not self.chat_2.chat_message_input.is_element_displayed():
self.chat_2.jump_to_card_by_text(self.username_1) self.chat_2.navigate_back_to_home_view()
self.home_2.chats_tab.click()
self.home_2.get_chat(self.username_1).click()
if not self.chat_1.chat_message_input.is_element_displayed(): if not self.chat_1.chat_message_input.is_element_displayed():
self.chat_1.jump_to_card_by_text(self.username_2) self.chat_1.navigate_back_to_home_view()
self.home_1.chats_tab.click()
self.home_1.get_chat(self.username_2).click()
app_package = self.chat_1.driver.current_package app_package = self.chat_1.driver.current_package
self.device_2.just_fyi("Verify Device1 can not edit and delete received message from Device2") self.device_2.just_fyi("Verify Device1 can not edit and delete received message from Device2")
@ -573,8 +584,6 @@ class TestOneToOneChatMultipleSharedDevicesNewUiTwo(MultipleSharedDeviceTestCase
@marks.testrail_id(702783) @marks.testrail_id(702783)
def test_1_1_chat_is_shown_message_sent_delivered_from_offline(self): def test_1_1_chat_is_shown_message_sent_delivered_from_offline(self):
# self.chat_2.jump_to_card_by_text(self.username_1)
# self.chat_1.jump_to_card_by_text(self.username_2)
self.home_1.just_fyi('Turn on airplane mode and check that offline status is shown on home view') self.home_1.just_fyi('Turn on airplane mode and check that offline status is shown on home view')
for home in self.homes: for home in self.homes:
home.driver.set_network_connection(ConnectionType.AIRPLANE_MODE) home.driver.set_network_connection(ConnectionType.AIRPLANE_MODE)

View File

@ -263,7 +263,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
self.chats[2].navigate_back_to_chat_view() self.chats[2].navigate_back_to_chat_view()
# workaround for app closed after navigating back from gallery # workaround for app closed after navigating back from gallery
if not self.chats[2].chats_tab.is_element_displayed(): if not self.chats[2].chat_message_input.is_element_displayed():
self.drivers[2].activate_app(app_package) self.drivers[2].activate_app(app_package)
SignInView(self.drivers[2]).sign_in() SignInView(self.drivers[2]).sign_in()
self.homes[2].chats_tab.click() self.homes[2].chats_tab.click()
@ -274,7 +274,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
self.chats[2].allow_all_button.click_if_shown() self.chats[2].allow_all_button.click_if_shown()
if not self.chats[2].get_image_by_index(0).is_element_image_similar_to_template("saucelabs_sauce_gallery.png"): if not self.chats[2].get_image_by_index(0).is_element_image_similar_to_template("saucelabs_sauce_gallery.png"):
self.errors.append("Image is not saved to gallery for member_2.") self.errors.append("Image is not saved to gallery for member_2.")
self.chats[2].navigate_back_to_chat_view() self.chats[2].navigate_back_to_home_view()
# workaround for app closed after navigating back from gallery # workaround for app closed after navigating back from gallery
if not self.chats[2].chats_tab.is_element_displayed(): if not self.chats[2].chats_tab.is_element_displayed():

View File

@ -392,6 +392,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.channel_2.just_fyi("Check gallery on second device") self.channel_2.just_fyi("Check gallery on second device")
self.channel_2.navigate_back_to_home_view() self.channel_2.navigate_back_to_home_view()
self.home_2.communities_tab.click()
self.home_2.get_to_community_channel_from_home(self.community_name) self.home_2.get_to_community_channel_from_home(self.community_name)
chat_element = self.channel_2.chat_element_by_text(image_description) chat_element = self.channel_2.chat_element_by_text(image_description)
try: try:
@ -520,6 +521,10 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.errors.append('Emoji message was not copied, text in clipboard is %s' % actual_copied_text) self.errors.append('Emoji message was not copied, text in clipboard is %s' % actual_copied_text)
self.channel_1.just_fyi("Can reply to emojis") self.channel_1.just_fyi("Can reply to emojis")
if not self.channel_2.chat_message_input.is_element_displayed():
self.home_2.navigate_back_to_home_view()
self.home_2.communities_tab.click()
self.home_2.get_to_community_channel_from_home(self.community_name)
self.channel_2.quote_message(emoji_unicode) self.channel_2.quote_message(emoji_unicode)
message_text = 'test message' message_text = 'test message'
self.channel_2.chat_message_input.send_keys(message_text) self.channel_2.chat_message_input.send_keys(message_text)
@ -572,6 +577,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
for home in self.home_1, self.home_2: for home in self.home_1, self.home_2:
if not home.chat_floating_screen.is_element_displayed(): if not home.chat_floating_screen.is_element_displayed():
home.navigate_back_to_home_view() home.navigate_back_to_home_view()
home.communities_tab.click()
home.get_to_community_channel_from_home(self.community_name) home.get_to_community_channel_from_home(self.community_name)
for key, data in preview_urls.items(): for key, data in preview_urls.items():
@ -630,8 +636,8 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
community_1 = community_element_1.click() community_1 = community_element_1.click()
channel_1_element = community_1.get_channel(self.channel_name) channel_1_element = community_1.get_channel(self.channel_name)
self.home_1.just_fyi('Check new messages badge is shown for community') self.home_1.just_fyi('Check new messages badge is shown for channel')
if not community_element_1.new_messages_grey_dot.is_element_displayed(): if not channel_1_element.new_messages_grey_dot.is_element_displayed():
self.errors.append('New messages channel badge is not shown on channel') self.errors.append('New messages channel badge is not shown on channel')
channel_1_element.click() channel_1_element.click()
self.errors.verify_no_errors() self.errors.verify_no_errors()
@ -673,7 +679,6 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.chat_1.just_fyi('Check that new messages from blocked user are not delivered') self.chat_1.just_fyi('Check that new messages from blocked user are not delivered')
self.chat_1.driver.set_network_connection(ConnectionType.ALL_NETWORK_ON) self.chat_1.driver.set_network_connection(ConnectionType.ALL_NETWORK_ON)
# self.home_1.jump_to_card_by_text('# %s' % self.channel_name)
self.home_1.communities_tab.click() self.home_1.communities_tab.click()
self.home_1.get_chat(self.community_name, community=True).click() self.home_1.get_chat(self.community_name, community=True).click()
self.home_1.get_chat(self.channel_name, community_channel=True).click() self.home_1.get_chat(self.channel_name, community_channel=True).click()
@ -695,7 +700,6 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.home_2.just_fyi("Check that can send message in community after unblock") self.home_2.just_fyi("Check that can send message in community after unblock")
self.chat_2.send_message(message_unblocked) self.chat_2.send_message(message_unblocked)
# self.home_1.jump_to_card_by_text('# %s' % self.channel_name)
self.home_1.communities_tab.click() self.home_1.communities_tab.click()
self.home_1.get_chat(self.community_name, community=True).click() self.home_1.get_chat(self.community_name, community=True).click()
self.home_1.get_chat(self.channel_name, community_channel=True).click() self.home_1.get_chat(self.channel_name, community_channel=True).click()
@ -942,7 +946,7 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
for home in self.homes: for home in self.homes:
home.navigate_back_to_home_view() home.navigate_back_to_home_view()
home.jump_to_communities_home() home.communities_tab.click()
community = home.get_chat(self.community_name, community=True).click() community = home.get_chat(self.community_name, community=True).click()
community.get_channel(self.channel_name).click() community.get_channel(self.channel_name).click()
@ -983,7 +987,7 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
@marks.testrail_id(702845) @marks.testrail_id(702845)
def test_community_leave(self): def test_community_leave(self):
self.home_2.navigate_back_to_home_view() self.home_2.navigate_back_to_home_view()
self.home_2.jump_to_communities_home() self.home_2.communities_tab.click()
community = self.home_2.get_chat(self.community_name, community=True) community = self.home_2.get_chat(self.community_name, community=True)
community_to_leave = CommunityView(self.drivers[1]) community_to_leave = CommunityView(self.drivers[1])
community.long_press_until_element_is_shown(community_to_leave.leave_community_button) community.long_press_until_element_is_shown(community_to_leave.leave_community_button)
@ -997,8 +1001,8 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
def test_community_hashtag_links_to_community_channels(self): def test_community_hashtag_links_to_community_channels(self):
for home in self.homes: for home in self.homes:
home.navigate_back_to_home_view() home.navigate_back_to_home_view()
self.home_2.jump_to_messages_home() self.home_2.chats_tab.click()
self.home_1.jump_to_communities_home() self.home_1.communities_tab.click()
self.home_1.just_fyi("Device 1 creates a closed community") self.home_1.just_fyi("Device 1 creates a closed community")
self.home_1.create_community(community_type="closed") self.home_1.create_community(community_type="closed")
@ -1029,11 +1033,13 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
not_shown.append("general") not_shown.append("general")
self.home_2.just_fyi("Device 2 joins the community") self.home_2.just_fyi("Device 2 joins the community")
self.home_2.jump_to_card_by_text(self.username_1) self.home_2.navigate_back_to_home_view()
self.home_2.chats_tab.click()
self.home_2.get_chat(self.username_1).click()
self.community_2.join_community(open_community=False) self.community_2.join_community(open_community=False)
self.home_1.just_fyi("Device 1 accepts the community request") self.home_1.just_fyi("Device 1 accepts the community request")
self.home_1.jump_to_communities_home() self.home_1.navigate_back_to_home_view()
try: try:
self.home_1.notifications_unread_badge.wait_for_visibility_of_element(120) self.home_1.notifications_unread_badge.wait_for_visibility_of_element(120)
except TimeoutException: except TimeoutException:
@ -1095,10 +1101,9 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
def test_community_join_when_node_owner_offline(self): def test_community_join_when_node_owner_offline(self):
for home in self.homes: for home in self.homes:
home.navigate_back_to_home_view() home.navigate_back_to_home_view()
self.home_2.jump_to_communities_home()
if self.home_2.get_chat(self.community_name, community=True).is_element_displayed(): if self.home_2.get_chat(self.community_name, community=True).is_element_displayed():
CommunityView(self.home_2.driver).leave_community(self.community_name) CommunityView(self.home_2.driver).leave_community(self.community_name)
self.home_1.jump_to_communities_home() self.home_1.communities_tab.click()
self.home_1.just_fyi("Device 1 creates open community") self.home_1.just_fyi("Device 1 creates open community")
self.home_1.create_community(community_type="open") self.home_1.create_community(community_type="open")
@ -1120,7 +1125,7 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
self.device_1.driver.terminate_app(app_package) self.device_1.driver.terminate_app(app_package)
self.home_2.just_fyi("Device 2 requests to join the community") self.home_2.just_fyi("Device 2 requests to join the community")
self.home_2.jump_to_messages_home() self.home_2.chats_tab.click()
self.home_2.get_chat(self.username_1).click() self.home_2.get_chat(self.username_1).click()
self.community_2.join_community(open_community=False) self.community_2.join_community(open_community=False)
exp_text = "You requested to join “%s" % community_name exp_text = "You requested to join “%s" % community_name
@ -1143,8 +1148,8 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
else: else:
self.errors.append("Community channel is not displayed for user before join") self.errors.append("Community channel is not displayed for user before join")
self.community_2.toast_content_element.wait_for_invisibility_of_element(30) self.community_2.toast_content_element.wait_for_invisibility_of_element(30)
self.community_2.close_community_view_button.click_until_absense_of_element( self.home_2.navigate_back_to_home_view()
self.community_2.close_community_view_button) self.home_2.communities_tab.click()
self.home_2.pending_communities_tab.click() self.home_2.pending_communities_tab.click()
if self.home_2.get_chat(community_name, community=True).is_element_displayed(): if self.home_2.get_chat(community_name, community=True).is_element_displayed():
self.home_2.get_chat(community_name, community=True).click() self.home_2.get_chat(community_name, community=True).click()

View File

@ -64,8 +64,9 @@ class TestDeepLinksOneDevice(MultipleSharedDeviceTestCase):
or self.community_view.join_community_button.is_element_displayed(5)) \ or self.community_view.join_community_button.is_element_displayed(5)) \
or self.community_view.community_title.text != text: or self.community_view.community_title.text != text:
self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url)) self.errors.append("Community '%s' was not requested to join by the url %s" % (text, url))
if text != "open community": # the last one if text != "Closed community": # the last one
self.home.jump_to_card_by_text(self.community_name) self.home.navigate_back_to_home_view()
self.home.get_to_community_channel_from_home(self.community_name)
self.errors.verify_no_errors() self.errors.verify_no_errors()

View File

@ -476,7 +476,7 @@ class CommunityView(HomeView):
if isinstance(user_names_to_invite, str): if isinstance(user_names_to_invite, str):
user_names_to_invite = [user_names_to_invite] user_names_to_invite = [user_names_to_invite]
self.driver.info("Share to %s community" % ', '.join(map(str, user_names_to_invite))) self.driver.info("Share to %s community" % ', '.join(map(str, user_names_to_invite)))
self.jump_to_communities_home() self.navigate_back_to_home_view()
home = self.get_home_view() home = self.get_home_view()
home.communities_tab.click() home.communities_tab.click()
community_element = home.get_chat(community_name, community=True) community_element = home.get_chat(community_name, community=True)
@ -1037,7 +1037,7 @@ class ChatView(BaseView):
def quote_message(self, message: str): def quote_message(self, message: str):
self.driver.info("Quoting '%s' message" % message) self.driver.info("Quoting '%s' message" % message)
self.chat_view_element_starts_with_text(message).long_press_until_element_is_shown(self.reply_message_button) self.chat_element_by_text(message).long_press_until_element_is_shown(self.reply_message_button)
self.reply_message_button.click() self.reply_message_button.click()
def set_reaction(self, message: str, emoji: str = 'thumbs-up', emoji_message=False): def set_reaction(self, message: str, emoji: str = 'thumbs-up', emoji_message=False):