diff --git a/test/ui-test/src/screens/StatusMainScreen.py b/test/ui-test/src/screens/StatusMainScreen.py index b9f305bb89..65c93aaa87 100644 --- a/test/ui-test/src/screens/StatusMainScreen.py +++ b/test/ui-test/src/screens/StatusMainScreen.py @@ -20,7 +20,6 @@ import time class MainScreenComponents(Enum): MAIN_WINDOW = "statusDesktop_mainWindow" POPUP_OVERLAY = "statusDesktop_mainWindow_overlay" - PUBLIC_CHAT_ICON = "mainWindow_public_chat_icon_StatusIcon" CHAT_NAVBAR_ICON = "navBarListView_Chat_navbar_StatusNavBarTabButton" COMMUNITY_PORTAL_BUTTON = "navBarListView_Communities_Portal_navbar_StatusNavBarTabButton" JOIN_PUBLIC_CHAT = "join_public_chat_StatusMenuItem" @@ -99,12 +98,6 @@ class StatusMainScreen: sleep_test(0.5) verify_failure(f"Banner is still visible after {timeoutMSec}ms") - def join_chat_room(self, room: str): - click_obj_by_name(MainScreenComponents.PUBLIC_CHAT_ICON.value) - #click_obj_by_name(MainScreenComponents.JOIN_PUBLIC_CHAT.value) - type(ChatNamePopUp.INPUT_ROOM_TOPIC_TEXT.value, room) - click_obj_by_name(ChatNamePopUp.START_CHAT_BTN.value) - def open_chat_section(self): click_obj_by_name(MainScreenComponents.CHAT_NAVBAR_ICON.value) diff --git a/test/ui-test/testSuites/global_shared/scripts/global_names.py b/test/ui-test/testSuites/global_shared/scripts/global_names.py index 5882debc52..982d7cb469 100644 --- a/test/ui-test/testSuites/global_shared/scripts/global_names.py +++ b/test/ui-test/testSuites/global_shared/scripts/global_names.py @@ -38,15 +38,12 @@ closeButton_StatusHeaderAction = {"container": statusDesktop_mainWindow_overlay, # Main Window - chat related: mainWindow_statusChatNavBarListView_ListView = {"container": statusDesktop_mainWindow, "objectName": "statusChatNavBarListView", "type": "ListView", "visible": True} navBarListView_Chat_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_statusChatNavBarListView_ListView, "objectName": "Messages-navbar", "type": "StatusNavBarTabButton", "visible": True} -mainWindow_public_chat_icon_StatusIcon = {"container": statusDesktop_mainWindow, "objectName": "public-chat-icon", "source": "qrc:/StatusQ/src/assets/img/icons/public-chat.svg", "type": "StatusIcon", "visible": True} chatList_Repeater = {"container": statusDesktop_mainWindow, "objectName": "chatListItems", "type": "Repeater", "visible": True} chatList = {"container": statusDesktop_mainWindow, "objectName": "ContactsColumnView_chatList", "type": "StatusChatList"} mainWindow_startChat = {"checkable": True, "container": statusDesktop_mainWindow, "objectName": "startChatButton", "type": "StatusIconTabButton"} -join_public_chat_StatusMenuItem = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "enabled": True, "text": "Join public chat", "type": "StatusMenuItem", "unnamed": 1, "visible": True} chatView_messageInput = {"container": statusDesktop_mainWindow, "objectName": "messageInputField", "type": "TextArea", "visible": True} chatView_StatusChatInfoButton = {"container": statusDesktop_mainWindow, "objectName": "chatInfoBtnInHeader", "type": "StatusChatInfoButton", "visible": True} chatInfoButton_Pin_Text = {"container": chatView_StatusChatInfoButton, "objectName": "StatusChatInfo_pinText", "type": "StatusBaseText", "visible": True} -joinPublicChat_input = {"container": statusDesktop_mainWindow_overlay, "objectName": "joinPublicChannelInput", "type": "TextEdit", "visible": True} startChat_Btn = {"container": statusDesktop_mainWindow_overlay, "objectName": "startChatButton", "type": "StatusButton"} chatButtonsPanelConfirmDeleteMessageButton_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "chatButtonsPanelConfirmDeleteMessageButton", "type": "StatusButton"} diff --git a/test/ui-test/testSuites/global_shared/steps/commonInitSteps.py b/test/ui-test/testSuites/global_shared/steps/commonInitSteps.py index 7673ba87de..4c41a0b17b 100644 --- a/test/ui-test/testSuites/global_shared/steps/commonInitSteps.py +++ b/test/ui-test/testSuites/global_shared/steps/commonInitSteps.py @@ -114,12 +114,6 @@ def signs_up_with_seed_phrase_process_steps(context, seed_phrase: str, user: str the_user_signs_up(user, password) the_user_lands_on_the_signed_in_app() -def the_user_joins_chat_room(chat_room: str): - main_screen = StatusMainScreen() - main_screen.join_chat_room(chat_room) - chat_screen = StatusChatScreen() - chat_screen.verify_chat_title(chat_room) - def the_user_opens_the_chat_section(): main_screen = StatusMainScreen() main_screen.open_chat_section() diff --git a/test/ui-test/testSuites/suite_communities/tst_searchFlows/test.feature b/test/ui-test/testSuites/suite_communities/tst_searchFlows/test.feature index 9d3109bfee..67c6e08491 100644 --- a/test/ui-test/testSuites/suite_communities/tst_searchFlows/test.feature +++ b/test/ui-test/testSuites/suite_communities/tst_searchFlows/test.feature @@ -40,27 +40,3 @@ Feature: Search feature (ctrl+F) And the user searches for "automation" When the user clicks on the search result for channel "automation-community" Then the channel named "automation-community" is open - - @mayfail - # myfail because of dekstop issue #7989. Once it is fixed, remove tag. - Scenario: The user can search for a public channel - Given the user opens the search menu - And the user searches for "automation" - When the user clicks on the search result for channel "search-automation-test-2" - Then the chat title is "search-automation-test-2" - - @mayfail - # myfail because of desktop issue #7989. Once it is fixed, remove tag. - Scenario: The user can search for a message in a public channel - Given the user opens the chat section - And the user joins chat room "search-automation-test-1" - And the user sends a random chat message - # Go back to the portal so that we see if the search really redirects - And the user opens the community portal section - And the user opens the search menu - - When the user searches the random message - Then the search menu shows 1 results - - When the user clicks on the search result for the random message - Then the chat title is "search-automation-test-1" diff --git a/test/ui-test/testSuites/suite_messaging/suite.conf b/test/ui-test/testSuites/suite_messaging/suite.conf index d6c8e68d41..9ad24eb2bf 100644 --- a/test/ui-test/testSuites/suite_messaging/suite.conf +++ b/test/ui-test/testSuites/suite_messaging/suite.conf @@ -2,6 +2,6 @@ AUT=nim_status_client ENVVARS=envvars LANGUAGE=Python OBJECTMAPSTYLE=script -TEST_CASES=tst_ChatFlow tst_groupChat tst_adminGroupChat tst_chatsNavigation +TEST_CASES=tst_groupChat tst_adminGroupChat VERSION=3 WRAPPERS=Qt diff --git a/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/bdd_hooks.py b/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/bdd_hooks.py deleted file mode 100644 index 0138221f57..0000000000 --- a/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/bdd_hooks.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# This file contains hook functions to run as the .feature file is executed - -sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/")) -sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/")) - -import steps.commonInitSteps as init_steps - -# Global properties for the specific feature -_user = "tester123" -_password = "TesTEr16843/!@00" -_chat_room = "test" - -@OnFeatureStart -def hook(context): - init_steps.context_init(context, testSettings) - init_steps.signs_up_process_steps(context, _user, _password) - init_steps.the_user_joins_chat_room(_chat_room) - -@OnFeatureEnd -def hook(context): - currentApplicationContext().detach() - snooze(_app_closure_timeout) - -@OnScenarioStart -def hook(context): - init_steps.the_user_opens_the_chat_section() - -@OnStepEnd -def hook(context): - context.userData["step_name"] = context._data["text"] \ No newline at end of file diff --git a/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/test.feature b/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/test.feature deleted file mode 100644 index 8ea04ac5a1..0000000000 --- a/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/test.feature +++ /dev/null @@ -1,140 +0,0 @@ -Feature: Status Desktop Chat Basic Flows - - As a user I want to join the public chat room "test" and do basic interactions. - - The following scenarios cover basic chat flows on "test" public channel. - - The feature start sequence is the following (setup on its own `bdd_hooks`): - ** given A first time user lands on the status desktop and generates new key - ** when user signs up with username "tester123" and password "TesTEr16843/!@00" - ** and the user lands on the signed in app - ** and user joins chat room "test" - - [Cleanup] Also each scenario starts with: - ** when the user opens the chat section - # TODO: Add scenario end -> clear chat input. - - Scenario Outline: The user can chat in a public room - When the user sends a chat message "" - Then the last chat message contains "" - Examples: - | message | - | Hello | - | How are you | - | I am from status | - | tell me how you do? | - - Scenario Outline: The user can reply to own message - Given the user sends a chat message "" - When the user replies to the message at index 0 with "" - Then the chat message "" is displayed as a reply of this user's "" - Examples: - | message | reply | - | random chat message | This is a reply | - - Scenario Outline: The user can edit a message - Given the user sends a chat message "Edit me" - # Checking that message can be edited several times - When the user edits the message at index 0 and changes it to "first edition" - Then the chat message "first edition" is displayed as an edited one - When the user edits the message at index 0 and changes it to "" - Then the chat message "" is displayed as an edited one - Examples: - | edited | - | Edited by me | - - @relyon-mailserver - Scenario Outline: The user can reply to another message - When the user replies to the message at index 0 with "" - Then the chat message "" is displayed as a reply - Examples: - | reply | - | This is a reply | - - - Scenario Outline: The user can delete his/her own message - Given the user sends a chat message "" - When the user deletes the message at index 0 - Then the last message displayed is not "" - Examples: - | message | - | random chat message | - - Scenario: The user can clear chat history - Given the user sends a chat message "Hi hi" - And the user sends a chat message "testing chat" - And the user sends a chat message "history" - When the user clears chat history - Then the chat is cleared - - Scenario: The user can send a GIF - Given the user opens app settings screen - And the user opens the messaging settings - When the user activates the link preview if it is deactivated - And the user activates tenor GIFs preview - And the user opens the chat section - And the user sends a GIF message - Then the GIF message is displayed - - Scenario Outline: The user can activate image unfurling - Given the user sends a chat message "" - And the image "" is not unfurled in the chat - And the user opens app settings screen - And the user opens the messaging settings - When the user activates the link preview if it is deactivated - And the user activates image unfurling - And the user opens the chat section - Then the image "" is unfurled in the chat - Examples: - | image_url | - | https://github.com/status-im/status-desktop/raw/master/test/ui-test/fixtures/images/doggo.jpeg | - - Scenario: The user is able to use emoji suggestions - Given the user types "hello :thumbs" - And the user selects the emoji in the suggestion's list - When the user presses enter - Then the last chat message contains "👍" - - @relyon-mailserver - Scenario: The user cannot delete another user's message - Then the user cannot delete the last message - - @relyon-mailserver - Scenario Outline: The user can do a mention - When the user inputs a mention to "" with message "" - Then the "" mention with message "" have been sent - Examples: - | displayName | message | - | tester123 | testing mention | - - @relyon-mailserver - Scenario Outline: The user can not do a mention to a not existing users - Then the user cannot input a mention to a not existing user "" - Examples: - | displayName | - | notExistingAccount | - | asdfgNoNo | - - Scenario: The user can send an emoji as a message - When the user sends the emoji "heart_eyes" as a message - Then the last chat message contains "😍" - - Scenario Outline: The user can send an emoji in a message - When the user sends the emoji "sunglasses" with message "" - Then the last chat message contains "😎" - And the last chat message contains "" - Examples: - | message | - | wow I'm so cool | - - Scenario: The user can type message with emoji autoreplace - When the user sends a chat message "Hello :)" - Then the last chat message contains "🙂" - And the last chat message contains "Hello" - - @mayfail - # NOTE: It may be flaky due to undeterministic network conditions and 3rd party infura response. - Scenario: The user can send a sticker after installing a free pack - Given the user installs the sticker pack at position 4 - When the user sends the sticker at position 2 in the list - Then the last chat message is a sticker \ No newline at end of file diff --git a/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/test.py b/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/test.py deleted file mode 100644 index 5df4558278..0000000000 --- a/test/ui-test/testSuites/suite_messaging/tst_ChatFlow/test.py +++ /dev/null @@ -1,8 +0,0 @@ -source(findFile('scripts', 'python/bdd.py')) - -setupHooks('bdd_hooks.py') -collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps/', '../../suite_onboarding/shared/steps/') - -def main(): - testSettings.throwOnFailure = True - runFeatureFile('test.feature') \ No newline at end of file diff --git a/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/bdd_hooks.py b/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/bdd_hooks.py deleted file mode 100644 index c059e27142..0000000000 --- a/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/bdd_hooks.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# This file contains hook functions to run as the .feature file is executed - -sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/")) -sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/")) - -import steps.commonInitSteps as init_steps - -# Global properties for the specific feature -_user = "tester123" -_password = "TesTEr16843/!@00" -_chat_room = "test" - -@OnFeatureStart -def hook(context): - init_steps.context_init(context, testSettings) - init_steps.signs_up_process_steps(context, _user, _password) - -@OnFeatureEnd -def hook(context): - currentApplicationContext().detach() - snooze(_app_closure_timeout) - -@OnScenarioStart -def hook(context): - init_steps.the_user_opens_the_chat_section() diff --git a/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/test.feature b/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/test.feature deleted file mode 100644 index 351c5f521d..0000000000 --- a/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/test.feature +++ /dev/null @@ -1,42 +0,0 @@ -Feature: Status Desktop Chat Navigation - - As a user, I want the 1-1 and group chat navigation - to be ordered by chats that I was most recently active in first, - so that recent chats are easy to navigate to. - - The feature start sequence is the following (setup on its own `bdd_hooks`): - ** given A first time user lands on the status desktop and generates new key - ** when user signs up with username "tester123" and password "TesTEr16843/!@00" - ** and the user lands on the signed in app - - [Cleanup] Also each scenario starts with: - ** when the user opens the chat section - - Scenario: The user joins a room and marks it as read - When the user joins chat room "test" - And the user marks the channel "test" as read - # TODO find a way to validate that it worked - - Scenario: The user join chats and sees chats in reversed order - Given the user has joined chats - | first-chat | - | second-chat | - | third-chat | - Then the user chats are sorted accordingly - | third-chat | - | second-chat | - | first-chat | - - Scenario: After sending a message the user sees chats sorder by most recent activity - Given the user has joined chats - | first-chat | - | second-chat | - | third-chat | - When the user switches to "second-chat" chat - And the user sends a random chat message - Then the random chat message is displayed - And the user chats are sorted accordingly - | second-chat | - | third-chat | - | first-chat | - diff --git a/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/test.py b/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/test.py deleted file mode 100644 index 81986d0aa3..0000000000 --- a/test/ui-test/testSuites/suite_messaging/tst_chatsNavigation/test.py +++ /dev/null @@ -1,9 +0,0 @@ -source(findFile('scripts', 'python/bdd.py')) - -setupHooks('bdd_hooks.py') -collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps/') - - -def main(): - testSettings.throwOnFailure = True - runFeatureFile('test.feature') diff --git a/test/ui-test/testSuites/suite_settings/tst_contactsFlow/test.feature b/test/ui-test/testSuites/suite_settings/tst_contactsFlow/test.feature index 2a7b58b211..237df15517 100644 --- a/test/ui-test/testSuites/suite_settings/tst_contactsFlow/test.feature +++ b/test/ui-test/testSuites/suite_settings/tst_contactsFlow/test.feature @@ -16,7 +16,8 @@ Feature: Status Desktop Contacts Flows Then the contact request for chat key "zQ3shQihZMmciZWUrjvsY6kUoaqSKp9DFSjMPRkkKGty3XCKZ" is present in the pending requests tab # TODO for future improvements: log into the other account and check that we received the request (will require some cleanup) - @relyon-mailserver + @relyon-mailserver @mayfail + # FIXME this test will fail because we no longer support public channels. Re-implement in a community channel. Issue #9252 Scenario: The user can add a contact from the chat # User 1 sends a message in the channel When the user opens the chat section