test(chat): re-add chat order test using 1-1 chat

Fixes #9251
This commit is contained in:
Jonathan Rainville 2023-02-08 13:48:42 -05:00
parent 9b7c2b15c0
commit 5f4000b7a5
3 changed files with 16 additions and 17 deletions

View File

@ -46,9 +46,11 @@ chatView_chatLogView_lastMsg_MessageView = {"container": chatView_log, "index":
chatView_lastChatText_Text = {"container": chatView_chatLogView_lastMsg_MessageView, "type": "TextEdit", "objectName": "StatusTextMessage_chatText", "visible": True}
chatView_gifPopupButton = {"container": statusDesktop_mainWindow, "objectName": "gifPopupButton", "type": "StatusFlatRoundButton", "visible": True}
chatView_ChatToolbarMoreOptionsButton = {"container": statusDesktop_mainWindow, "objectName": "chatToolbarMoreOptionsButton", "type": "StatusFlatRoundButton", "visible": True}
chatView_SuggestionBoxPanel ={"container": statusDesktop_mainWindow, "objectName": "suggestionsBox", "type": "SuggestionBoxPanel"}
chatView_suggestion_ListView ={"container": chatView_SuggestionBoxPanel, "objectName": "suggestionBoxList", "type": "StatusListView"}
chatView_userMentioned_ProfileView ={"container": statusDesktop_mainWindow_overlay, "objectName": "profileView", "type": "ProfileView"}
chatView_chatLogView_lastMsg_MessageView = {"container": chatView_log, "index": 0, "type": "MessageView"}
chatView_SuggestionBoxPanel ={"container": statusDesktop_mainWindow, "objectName": "suggestionsBox", "type": "SuggestionBoxPanel", "visible": True}
chatView_suggestion_ListView ={"container": chatView_SuggestionBoxPanel, "objectName": "suggestionBoxList", "type": "StatusListView", "visible": True}
chatView_userMentioned_ProfileView ={"container": statusDesktop_mainWindow_overlay, "objectName": "profileView", "type": "ProfileView", "visible": True}
chatView_ChatToolbarMoreOptionsButton = {"container": statusDesktop_mainWindow, "objectName": "chatToolbarMoreOptionsButton", "type": "StatusFlatRoundButton", "visible": True}
# Gif popup:
gifPopup_enableGifButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "enableGifsButton", "type": "StatusButton"}

View File

@ -55,10 +55,6 @@ def step(context, text, obj):
def step(context: any, obj: str):
the_user_clicks_on_the_following_ui_component(obj)
@Given("the user has joined chats")
def step(context):
the_user_joins_chats(context)
#########################
### ACTIONS region:
#########################
@ -84,10 +80,6 @@ def step(context, room):
def step(context, amount):
time.sleep(2)
@When("the user joins chats")
def step(context):
the_user_joins_chats(context)
#########################
### VERIFICATIONS region:
#########################
@ -114,8 +106,3 @@ def the_user_inputs_the_following_text_with_uicomponent(text: str, obj):
def the_user_clicks_on_the_following_ui_component(obj):
init_steps.the_user_clicks_on_the_following_ui_component(obj)
def the_user_joins_chats(context: any):
table = context.table
for i, row in enumerate(table):
room = row[0]
init_steps.the_user_joins_chat_room(room)

View File

@ -21,4 +21,14 @@ Feature: Status Desktop One to One Chat Flows
When the user creates a one to one chat with "Athletic"
Then the chat title is "Athletic"
When the user sends a chat message "Test message"
Then the last chat message contains "Test message"
Then the last chat message contains "Test message"
Scenario: After sending a message the user sees chats order by most recent activity
When the user creates a one to one chat with "Athletic"
And the user creates a one to one chat with "Nervous"
And the user switches to "Athletic" chat
And the user sends a random chat message
Then the random chat message is displayed
And the user chats are sorted accordingly
| Athletic |
| Nervous |