test(suite_messaging): Created new suite_messaging

Created new `suite_messaging` where all related chat tests will be migrated to.
- `tst_ChatFlow` has been moved to new `suite_messaging`. It still contains some broken tests.
- `tst_groupChat` has been moved to new `suite_messaging`. It is now working (but it relies on the mailserver so could fail sometimes).
- `tst_statusLoginPassword` has been moved to new `suite_onboarding`.
- It has been needed to move some object definitions from `chat_names.py` to `global_names.py` since they are shared between different suites.
- Some other minor object and steps definitions have been moved to fit with the new structure.

Closes #7624
This commit is contained in:
Noelia 2022-09-29 16:35:16 +02:00 committed by Noelia
parent 03691ba4b1
commit b2f927b716
21 changed files with 45 additions and 31 deletions

View File

@ -29,7 +29,7 @@ class MainScreenComponents(Enum):
COMMUNITY_NAVBAR_BUTTONS = "navBarListView_All_Community_Buttons"
SECURE_SEEDPHRASE_BANNER = "secureSeedPhrase_Banner"
CONNECTION_INFO_BANNER = "connectionInfo_Banner"
UPDATE_APP_BANNER = "updateAppInfo_Banner"
UPDATE_APP_BANNER = "appVersionUpdate_Banner"
TESTNET_INFO_BANNER = "testnetInfo_Banner"
PROFILE_NAVBAR_BUTTON = "mainWindow_ProfileNavBarButton"
USERSTATUSMENU_ALWAYS_ACTIVE_ACTION = "userContextmenu_AlwaysActiveButton"

View File

@ -6,7 +6,7 @@ chatView_log = {"container": statusDesktop_mainWindow, "objectName": "chatLogVie
chatMessageListView_msgDelegate_MessageView = {"container": chatView_log, "objectName": "chatMessageViewDelegate", "index": 1, "type": "MessageView", "visible": True}
secureSeedPhrase_Banner = {"container": statusDesktop_mainWindow, "objectName": "secureYourSeedPhraseBanner", "type": "ModuleWarning"}
connectionInfo_Banner = {"container": statusDesktop_mainWindow, "objectName": "connectionInfoBanner", "type": "ModuleWarning"}
updateAppInfo_Banner = {"container": statusDesktop_mainWindow, "objectName": "updateAppInfoBanner", "type": "ModuleWarning"}
appVersionUpdate_Banner = {"container": statusDesktop_mainWindow, "objectName": "appVersionUpdateBanner", "type": "ModuleWarning"}
testnetInfo_Banner = {"container": statusDesktop_mainWindow, "objectName": "testnetBanner", "type": "ModuleWarning"}
statusDesktop_mainWindow_AppMain_EmojiPopup_SearchTextInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "StatusEmojiPopup_searchBox", "type": "TextEdit", "visible": True}
mainWindow_ScrollView = {"container": statusDesktop_mainWindow, "type": "StatusScrollView", "unnamed": 1, "visible": True}
@ -33,6 +33,11 @@ chatList_Repeater = {"container": statusDesktop_mainWindow, "objectName": "chatL
chatList = {"container": statusDesktop_mainWindow, "objectName": "ContactsColumnView_chatList", "type": "StatusChatList"}
mainWindow_startChat = {"checkable": True, "container": statusDesktop_mainWindow, "objectName": "startChatButton", "type": "StatusIconTabButton"}
join_public_chat_StatusMenuItemDelegate = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "enabled": True, "text": "Join public chat", "type": "StatusMenuItemDelegate", "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"}
# My Profile Popup
ProfileHeader_userImage = {"container": statusDesktop_mainWindow_overlay, "objectName": "ProfileHeader_userImage", "type": "UserImage", "visible": True}

View File

@ -16,6 +16,12 @@
from common.Common import *
import time
from screens.StatusMainScreen import StatusMainScreen
from screens.StatusChatScreen import StatusChatScreen
_statusMain = StatusMainScreen()
_statusChat = StatusChatScreen()
@Given("the user starts the application with a specific data folder |any|")
def step(context, data_folder_path):
waitFor(lambda: currentApplicationContext().detach(), 500)
@ -39,6 +45,11 @@ def step(context, text, obj):
def step(context, obj):
click_on_an_object(obj)
@When("user joins chat room |any|")
def step(context, room):
_statusMain.join_chat_room(room)
_statusChat.verify_chat_title(room)
@Then("the following ui-component |any| is not enabled")
def step(context, obj):

View File

@ -2,9 +2,7 @@ from scripts.global_names import *
# Chat view:
navBarListView_Chat_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_navBarListView_ListView, "objectName": "Chat-navbar", "type": "StatusNavBarTabButton", "visible": True}
chatView_StatusChatInfoButton = {"container": statusDesktop_mainWindow, "objectName": "chatInfoBtnInHeader", "type": "StatusChatInfoButton", "visible": True}
mainWindow_scrollView_ScrollView = {"container": statusDesktop_mainWindow, "id": "scrollView", "type": "StatusScrollView", "unnamed": 1, "visible": True}
chatView_messageInput = {"container": statusDesktop_mainWindow, "objectName": "messageInputField", "type": "TextArea", "visible": True}
chatView_chatLogView_lastMsg_MessageView = {"container": chatView_log, "index": 0, "type": "MessageView"}
chatView_lastChatText_Text = {"container": chatView_chatLogView_lastMsg_MessageView, "type": "TextEdit", "objectName": "StatusTextMessage_chatText", "visible": True}
chatView_replyToMessageButton = {"container": chatView_log, "objectName": "replyToMessageButton", "type": "StatusFlatRoundButton", "visible": True}
@ -13,7 +11,6 @@ chatView_editMessageInputComponent = {"container": statusDesktop_mainWindow, "ob
chatView_editMessageInputTextArea = {"container": chatView_editMessageInputComponent, "objectName": "messageInputField", "type": "TextArea", "visible": True}
chatView_DeleteMessageButton = {"container": chatView_log, "objectName": "chatDeleteMessageButton", "type": "StatusFlatRoundButton"}
chatView_TogglePinMessageButton = {"container": chatView_log, "objectName": "MessageView_toggleMessagePin", "type": "StatusFlatRoundButton", "visible": True}
chatInfoButton_Pin_Text = {"container": chatView_StatusChatInfoButton, "objectName": "StatusChatInfo_pinText", "type": "StatusBaseText", "visible": True}
chatButtonsPanelConfirmDeleteMessageButton_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "chatButtonsPanelConfirmDeleteMessageButton", "type": "StatusButton"}
mark_as_Read_StatusMenuItemDelegate = {"container": statusDesktop_mainWindow_overlay, "objectName": "chatMarkAsReadMenuItem", "type": "StatusMenuItemDelegate", "visible": True}
chat_Input_Stickers_Button = {"container": statusDesktop_mainWindow, "objectName": "statusChatInputStickersButton", "type": "StatusFlatRoundButton", "visible": True}
@ -24,7 +21,6 @@ emojiSuggestions_first_inputListRectangle ={"container": statusDesktop_mainWindo
emojiPopup_Emoji_Button_Placeholder = {"container": statusDesktop_mainWindow, "objectName": "statusEmoji_%NAME%", "type": "StatusEmoji", "visible": True}
chatInput_Emoji_Button = {"container": statusDesktop_mainWindow, "objectName": "statusChatInputEmojiButton", "type": "StatusFlatRoundButton", "visible": True}
chatView_ChatToolbarMoreOptionsButton = {"container": statusDesktop_mainWindow, "objectName": "chatToolbarMoreOptionsButton", "type": "StatusFlatRoundButton", "visible": True}
chatInput_Root = {"container": statusDesktop_mainWindow, "objectName": "statusChatInput", "type": "Rectangle", "visible": True}
chatView_gifPopupButton = {"container": statusDesktop_mainWindow, "objectName": "gifPopupButton", "type": "StatusFlatRoundButton", "visible": True}
chatView_unfurledImageComponent_linkImage = {"container": chatView_log, "objectName": "LinksMessageView_unfurledImageComponent_linkImage", "type": "StatusChatImageLoader", "visible": True}
chatView_unfurledLinkComponent_linkImage = {"container": chatView_log, "objectName": "LinksMessageView_unfurledLinkComponent_linkImage", "type": "StatusChatImageLoader", "visible": True}
@ -49,8 +45,6 @@ gifPopup_enableGifButton = {"container": statusDesktop_mainWindow_overlay, "obje
gifPopup_gifMouseArea = {"container": statusDesktop_mainWindow_overlay, "objectName": "gifMouseArea_1", "type": "MouseArea"}
# Join chat popup:
startChat_Btn = {"container": statusDesktop_mainWindow_overlay, "objectName": "startChatButton", "type": "StatusButton"}
joinPublicChat_input = {"container": statusDesktop_mainWindow_overlay, "objectName": "joinPublicChannelInput", "type": "TextEdit", "visible": True}
chat_name_PlaceholderText = {"container": statusDesktop_mainWindow_overlay, "text": "chat-name", "type": "PlaceholderText", "unnamed": 1, "visible": True}
# Create chat view:

View File

@ -0,0 +1,8 @@
# encoding: UTF-8
from objectmaphelper import *
from scripts.onboarding_names import *
from scripts.login_names import *
from scripts.settings_names import *
from chat_names import *

View File

@ -14,11 +14,6 @@ _statusCreateChatView = StatusCreateChatScreen()
@When("the user opens the chat section")
def step(context):
_statusMain.open_chat_section()
@When("user joins chat room |any|")
def step(context, room):
_statusMain.join_chat_room(room)
_statusChat.verify_chat_title(room)
@When("the user creates a group chat adding users")
def step(context):

View File

@ -0,0 +1,6 @@
AUT=nim_status_client
LANGUAGE=Python
OBJECTMAPSTYLE=script
TEST_CASES=tst_ChatFlow tst_groupChat
VERSION=3
WRAPPERS=Qt

View File

@ -14,7 +14,6 @@ Feature: Status Desktop Chat
When user signs up with username tester123 and password TesTEr16843/!@00
Then the user lands on the signed in app
@mayfail
Scenario: User joins a public room and chats
When user joins chat room test
Then user is able to send chat message
@ -24,13 +23,13 @@ Feature: Status Desktop Chat
| I am from status |
| tell me how you do? |
@mayfail @merge
@merge
Scenario: User can reply to their own message
When user joins chat room test
Then the user is able to send a random chat message
Then the user can reply to the message at index 0 with "This is a reply"
@mayfail @merge
@merge
Scenario: User can edit a message
When user joins chat room test
Then user is able to send chat message
@ -51,14 +50,14 @@ Feature: Status Desktop Chat
Then the user can mark the channel test as read
# TODO find a way to validate that it worked
@mayfail @merge
@merge
Scenario: User can delete their own message
When user joins chat room automation-test
Then the user is able to send a random chat message
Then the user can delete the message at index 0
Then the last message is not the random message
@mayfail @merge
@merge
Scenario: User can clear chat history
When user joins chat room test
Then user is able to send chat message
@ -139,7 +138,7 @@ Feature: Status Desktop Chat
Then the emoji 😎 is displayed in the last message
And the message wow I'm so cool is displayed in the last message
@mayfail @merge
@merge
Scenario: User sees chats sorted by most recent activity
When user joins chat room first-chat
And user joins chat room second-chat
@ -163,7 +162,7 @@ Feature: Status Desktop Chat
And the message Hello is displayed in the last message
@mayfail @merge
@merge
Scenario: User can send a sticker after installing a free pack
When user joins chat room automation-test
Then the user can install the sticker pack at position 4

View File

@ -4,3 +4,4 @@ from objectmaphelper import *
from scripts.onboarding_names import *
from scripts.login_names import *
from scripts.settings_names import *

View File

@ -1,11 +1,6 @@
from screens.StatusLoginScreen import StatusLoginScreen
_loginScreen = StatusLoginScreen()
@When("the user logs in with password |any|")
def step(context, password):
_loginScreen.login(password)
@When("the user |any| logs in with password |any|")
def step(context, username, password):

View File

@ -5,4 +5,4 @@ collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps
def main():
testSettings.throwOnFailure = True
runFeatureFile('test.feature')
runFeatureFile('test.feature')

View File

@ -4,11 +4,10 @@ from objectmaphelper import *
#from scripts.global_names import *
from scripts.onboarding_names import *
from scripts.settings_names import *
from scripts.login_names import *
from sections.chat_names import *
from sections.community_names import *
from sections.community_portal_names import *
from scripts.login_names import *
from sections.search_names import *
from sections.settings_names import *
from sections.wallet_names import *

View File

@ -18,6 +18,7 @@ mainWindow_communityColumnView_statusChatList = {"container": mainWindow_communi
delete_Channel_ConfirmationDialog_DeleteButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "deleteChatConfirmationDialogDeleteButton", "type": "StatusButton"}
mainWindow_chatInfoBtnInHeader_StatusChatInfoButton = {"container": statusDesktop_mainWindow, "objectName": "chatInfoBtnInHeader", "type": "StatusChatInfoButton", "visible": True}
communityChatListCategories_Repeater = {"container": statusDesktop_mainWindow, "objectName": "communityChatListCategories", "type": "Repeater"}
chatInput_Root = {"container": statusDesktop_mainWindow, "objectName": "statusChatInput", "type": "Rectangle", "visible": True}
# Community channel popup:
createOrEditCommunityChannelNameInput_TextEdit = {"container": statusDesktop_mainWindow_overlay, "objectName": "createOrEditCommunityChannelNameInput", "type": "TextEdit", "visible": True}

View File

@ -5,6 +5,6 @@ HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAPSTYLE=script
TEST_CASES=tst_statusLoginPassword tst_basicChatFlow tst_wallet tst_communityFlows tst_groupChat tst_transaction tst_settingsMenu tst_userIdentity tst_languageSettings tst_searchFlows tst_communityMessageFlows
TEST_CASES=tst_statusLoginPassword tst_wallet tst_communityFlows tst_transaction tst_settingsMenu tst_userIdentity tst_languageSettings tst_searchFlows tst_communityMessageFlows
VERSION=3
WRAPPERS=Qt

View File

@ -542,7 +542,7 @@ Item {
readonly property string version: appMain.rootStore.latestVersion
readonly property bool updateAvailable: appMain.rootStore.newVersionAvailable
objectName: "updateAppInfoBanner"
objectName: "appVersionUpdateBanner"
Layout.fillWidth: true
type: ModuleWarning.Success
text: updateAvailable ? qsTr("A new version of Status (%1) is available").arg(version)