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 b0e435167e..ab9c4ac3c3 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 @@ -1365,12 +1365,13 @@ class TestOneToOneChatMultipleSharedDevicesNewUiTwo(MultipleSharedDeviceTestCase "Message 1", "Message 2", "Message 3", "Message 4" @marks.testrail_id(702783) + @marks.xfail(reason="Data delivery issue") 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') + app_package = self.home_1.driver.current_package for home in self.homes: - app_package = self.home_1.driver.current_package home.toggle_airplane_mode() if not home.chats_tab.is_element_displayed() and not home.chat_floating_screen.is_element_displayed(): home.driver.activate_app(app_package) diff --git a/test/appium/tests/critical/chats/test_group_chat.py b/test/appium/tests/critical/chats/test_group_chat.py index 7b1fb471c1..29f2d1a2c8 100644 --- a/test/appium/tests/critical/chats/test_group_chat.py +++ b/test/appium/tests/critical/chats/test_group_chat.py @@ -402,6 +402,7 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase): self.errors.verify_no_errors() @marks.testrail_id(702808) + @marks.xfail(reason="Data delivery issue") def test_group_chat_offline_pn(self): for i in range(1, 3): self.homes[i].navigate_back_to_home_view() diff --git a/test/appium/tests/critical/test_public_chat_browsing.py b/test/appium/tests/critical/test_public_chat_browsing.py index 5760cb6435..128658e6c8 100644 --- a/test/appium/tests/critical/test_public_chat_browsing.py +++ b/test/appium/tests/critical/test_public_chat_browsing.py @@ -309,7 +309,6 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase): self.drivers, self.loop = create_shared_drivers(1) self.sign_in = SignInView(self.drivers[0]) self.username = 'first user' - self.discovery_community_attributes = "Contributors' test community", 'test anything here', 'Web3', 'Software dev' self.home = self.sign_in.create_user(username=self.username) self.home.communities_tab.click_until_presence_of_element(self.home.plus_community_button) @@ -322,23 +321,41 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase): self.channel = self.community_view.get_channel(self.channel_name).click() @marks.testrail_id(703503) - @marks.xfail(reason="https://github.com/status-im/status-mobile/issues/17175", run=False) + @marks.xfail( + reason="Request to Join Community button color issue: https://github.com/status-im/status-mobile/issues/17295") def test_community_discovery(self): self.home.navigate_back_to_home_view() self.home.communities_tab.click() self.home.discover_communities_button.click() - for text in self.discovery_community_attributes: - if not self.home.element_by_text(text).is_element_displayed(10): - self.errors.append("%s in not in Discovery!" % text) - self.home.element_by_text(self.discovery_community_attributes[0]).click() - element_templates = { - self.community_view.join_button: 'discovery_join_button.png', - self.community_view.get_channel_avatar(): 'discovery_general_channel.png', - } - for element, template in element_templates.items(): - if element.is_element_differs_from_template(template): - element.save_new_screenshot_of_element('%s_different.png' % element.name) - self.errors.append("Element %s is different from expected template %s!" % (element.locator, template)) + self.home.community_card_item.wait_for_visibility_of_element(30) + + if len(self.home.community_card_item.find_elements()) > 1: + contributors_test_community_attributes = "Contributors' test community", 'test anything here', \ + 'Web3', 'Software dev' + for text in contributors_test_community_attributes: + if not self.home.element_by_text(text).is_element_displayed(10): + self.errors.append("'%s' text is not in Discovery!" % text) + self.home.element_by_text(contributors_test_community_attributes[0]).click() + element_templates = { + self.community_view.join_button: 'discovery_join_button.png', + self.community_view.get_channel_avatar(): 'discovery_general_channel.png', + } + for element, template in element_templates.items(): + if element.is_element_differs_from_template(template): + element.save_new_screenshot_of_element('%s_different.png' % template.split('.')[0]) + self.errors.append( + "Element %s is different from expected template %s!" % (element.locator, template)) + self.community_view.navigate_back_to_home_view() + self.home.communities_tab.click() + self.home.discover_communities_button.click() + self.home.community_card_item.wait_for_visibility_of_element(30) + self.home.swipe_up() + + status_ccs_community_attributes = '(old) Status CCs', 'Community for Status CCs', 'Ethereum', \ + 'Software dev', 'Web3' + for text in status_ccs_community_attributes: + if not self.community_view.element_by_text(text).is_element_displayed(10): + self.errors.append("'%s' text is not shown for (old) Status CCs!" % text) self.errors.verify_no_errors() @marks.testrail_id(702846) @@ -839,8 +856,8 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase): self.channel_2.send_message_button.click() message = self.channel_1.get_preview_message_by_text(url) message.wait_for_element(60) - # if not message.preview_image: - # self.errors.append("No preview is shown for %s" % link_data['url']) + if not message.preview_image: + self.errors.append("No preview image is shown for %s" % url) shown_title = message.preview_title.text if shown_title != data['title']: self.errors.append("Title is not equal expected for '%s', actual is '%s'" % (url, shown_title)) @@ -1072,7 +1089,7 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase): self.channel_2 = self.community_2.get_channel(self.channel_name).click() @marks.testrail_id(702786) - @marks.xfail(reason="Issue with username in PN, issue #6 in 15500") + @marks.xfail(reason="Issue with username in PN, https://github.com/status-im/status-mobile/issues/17396") def test_community_mentions_push_notification(self): self.home_1.navigate_back_to_home_view() self.device_1.open_notification_bar() diff --git a/test/appium/tests/medium/test_activity_center.py b/test/appium/tests/medium/test_activity_center.py index 0b06f9baac..40651cca99 100644 --- a/test/appium/tests/medium/test_activity_center.py +++ b/test/appium/tests/medium/test_activity_center.py @@ -33,9 +33,8 @@ class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestC self.home_2.add_a_contact_chat_bottom_sheet_button.click() self.home_2.element_by_translation_id("paste").click() self.home_2.element_by_translation_id("user-found").wait_for_visibility_of_element(10) - # TODO: Blocked by 15500 - # if not self.home_2.element_by_text(self.username_1).is_element_displayed(): - # self.errors.append("Username is not shown on 'Add contact' page after entering valid public key") + if not self.home_2.element_by_text(self.username_1).is_element_displayed(30): + self.errors.append("Username is not shown on 'Add contact' page after entering valid public key") chat = self.home_2.get_chat_view() chat.view_profile_new_contact_button.click_until_presence_of_element(chat.profile_block_contact_button) diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 735167a764..e8bf478c24 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -517,7 +517,7 @@ class PreviewMessage(ChatElementByText): def preview_image(self): class PreviewImage(SilentButton): def __init__(self, driver, parent_locator: str): - super().__init__(driver, prefix=parent_locator, xpath="//*[@content-desc='member-photo']") + super().__init__(driver, prefix=parent_locator, xpath="//*[@content-desc='thumbnail']") return PreviewMessage.return_element_or_empty(PreviewImage(self.driver, self.locator)) diff --git a/test/appium/views/elements_templates/discovery_general_channel.png b/test/appium/views/elements_templates/discovery_general_channel.png index 81b1aa15bf..49f435e3eb 100644 Binary files a/test/appium/views/elements_templates/discovery_general_channel.png and b/test/appium/views/elements_templates/discovery_general_channel.png differ diff --git a/test/appium/views/home_view.py b/test/appium/views/home_view.py index e44145fbae..2695de7e1e 100644 --- a/test/appium/views/home_view.py +++ b/test/appium/views/home_view.py @@ -317,6 +317,9 @@ class HomeView(BaseView): self.driver, xpath="(//*[@content-desc='link-to-profile']/preceding-sibling::*[1]/android.widget.TextView)[1]") + # Discover communities + self.community_card_item = BaseElement(self.driver, accessibility_id="community-card-item") + def wait_for_syncing_complete(self): self.driver.info('Waiting for syncing to complete') while True: