fix(community-tests): fix a couple community tests
This commit is contained in:
parent
8296dd443b
commit
0806d657d3
|
@ -77,11 +77,12 @@ class CreateOrEditCommunityChannelPopup(Enum):
|
|||
COMMUNITY_CHANNEL_SAVE_OR_CREATE_BUTTON: str = "createOrEditCommunityChannelBtn_StatusButton"
|
||||
EMOJI_BUTTON: str = "createOrEditCommunityChannel_EmojiButton"
|
||||
EMOJI_SEARCH_TEXT_INPUT: str = "statusDesktop_mainWindow_AppMain_EmojiPopup_SearchTextInput"
|
||||
EMOJI_POPUP_EMOJI_PLACEHOLDER = "emojiPopup_Emoji_Button_Placeholder"
|
||||
EMOJI_POPUP_EMOJI_PLACEHOLDER = "createOrEditCommunityChannel_Emoji_Button_Placeholder"
|
||||
|
||||
class CreateOrEditCommunityCategoryPopup(Enum):
|
||||
COMMUNITY_CATEGORY_NAME_INPUT: str = "createOrEditCommunityCategoryNameInput_TextEdit"
|
||||
COMMUNITY_CATEGORY_LIST: str = "createOrEditCommunityCategoryChannelList_ListView"
|
||||
COMMUNITY_CATEGORY_LIST_ITEM_PLACEHOLDER: str = "createOrEditCommunityCategoryChannelList_ListItem_Placeholder"
|
||||
COMMUNITY_CATEGORY_BUTTON: str = "createOrEditCommunityCategoryBtn_StatusButton"
|
||||
|
||||
class StatusCommunityScreen:
|
||||
|
@ -116,14 +117,20 @@ class StatusCommunityScreen:
|
|||
else:
|
||||
verify_failure("Can't find channel " + channel_name)
|
||||
|
||||
def _get_checked_channel_names_in_category_popup(self):
|
||||
listView = get_obj(CreateOrEditCommunityCategoryPopup.COMMUNITY_CATEGORY_LIST.value)
|
||||
def _get_checked_channel_names_in_category_popup(self, channel_name = ""):
|
||||
listView = wait_and_get_obj(CreateOrEditCommunityCategoryPopup.COMMUNITY_CATEGORY_LIST.value)
|
||||
|
||||
if (channel_name != ""):
|
||||
# Wait for the list item to be loaded
|
||||
wait_by_wildcards(CreateOrEditCommunityCategoryPopup.COMMUNITY_CATEGORY_LIST_ITEM_PLACEHOLDER.value, "%NAME%", channel_name)
|
||||
|
||||
result = []
|
||||
|
||||
for index in range(listView.count):
|
||||
listItem = listView.itemAtIndex(index)
|
||||
if (listItem.checked):
|
||||
result.append(listItem.objectName.toLower())
|
||||
|
||||
return result
|
||||
|
||||
def _open_edit_channel_popup(self):
|
||||
|
@ -210,7 +217,7 @@ class StatusCommunityScreen:
|
|||
|
||||
self._open_category_edit_popup(category)
|
||||
|
||||
checked_channel_names = self._get_checked_channel_names_in_category_popup()
|
||||
checked_channel_names = self._get_checked_channel_names_in_category_popup(community_channel_names[0])
|
||||
split = community_channel_names.split(", ")
|
||||
for channel_name in split:
|
||||
if channel_name in checked_channel_names:
|
||||
|
@ -276,7 +283,7 @@ class StatusCommunityScreen:
|
|||
|
||||
def check_community_channel_emoji(self, emojiStr: str):
|
||||
obj = wait_and_get_obj(CommunityScreenComponents.CHAT_IDENTIFIER_CHANNEL_ICON.value)
|
||||
expect_true(str(obj.icon.emoji).find(emojiStr) >= 0, "Same emoji check")
|
||||
expect_true(str(obj.emojiIcon).find(emojiStr) >= 0, "Same emoji check")
|
||||
|
||||
def _verify_image_sent(self, message_index: int):
|
||||
image_obj = get_obj(CommunityScreenComponents.CHAT_LOG.value).itemAtIndex(message_index)
|
||||
|
@ -330,7 +337,7 @@ class StatusCommunityScreen:
|
|||
|
||||
def check_pin_count(self, wanted_pin_count: int):
|
||||
pin_text_obj = wait_and_get_obj(CommunityScreenComponents.PIN_TEXT.value)
|
||||
verify_equals(pin_text_obj.text, wanted_pin_count)
|
||||
verify_equals(str(pin_text_obj.text), str(wanted_pin_count))
|
||||
|
||||
def invite_user_to_community(self, user_name: str, message: str):
|
||||
click_obj_by_name(CommunityScreenComponents.ADD_MEMBERS_BUTTON.value)
|
||||
|
|
|
@ -31,6 +31,7 @@ modal_Close_Button = {"container": statusDesktop_mainWindow_overlay, "objectName
|
|||
delete_Channel_ConfirmationDialog_DeleteButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "deleteChatConfirmationDialogDeleteButton", "type": "StatusButton"}
|
||||
|
||||
# Main Window - chat related:
|
||||
navBarListView_Chat_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_navBarListView_ListView, "objectName": "Chat-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"}
|
||||
chatList = {"container": statusDesktop_mainWindow, "objectName": "ContactsColumnView_chatList", "type": "StatusChatList"}
|
||||
|
|
|
@ -29,6 +29,7 @@ communitySettings_Members_NavigationListItem = {"container": statusDesktop_mainW
|
|||
communitySettings_MembersTab_Members_ListView = {"container": statusDesktop_mainWindow, "objectName": "CommunityMembersTabPanel_MembersListViews", "type": "ListView", "visible": True}
|
||||
communitySettings_MembersTab_Member_Kick_Button = {"container": communitySettings_MembersTab_Members_ListView, "objectName": "MemberListIten_KickButton", "type": "StatusButton", "visible": True}
|
||||
communitySettings_KickModal_Kick_Button = {"container": statusDesktop_mainWindow_overlay, "objectName": "CommunityMembers_KickModal_KickButton", "type": "StatusButton", "visible": True}
|
||||
chatView_TogglePinMessageButton = {"container": chatView_log, "objectName": "MessageView_toggleMessagePin", "type": "StatusFlatRoundButton", "visible": True}
|
||||
|
||||
|
||||
# Community channel popup:
|
||||
|
@ -36,10 +37,12 @@ createOrEditCommunityChannelNameInput_TextEdit = {"container": statusDesktop_mai
|
|||
createOrEditCommunityChannelDescriptionInput_TextEdit = {"container": statusDesktop_mainWindow_overlay, "objectName": "createOrEditCommunityChannelDescriptionInput", "type": "TextEdit", "visible": True}
|
||||
createOrEditCommunityChannelBtn_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createOrEditCommunityChannelBtn", "type": "StatusButton", "visible": True}
|
||||
createOrEditCommunityChannel_EmojiButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "StatusChannelPopup_emojiButton", "type": "StatusRoundButton", "visible": True}
|
||||
createOrEditCommunityChannel_Emoji_Button_Placeholder = {"container": statusDesktop_mainWindow, "objectName": "statusEmoji_%NAME%", "type": "StatusEmoji", "visible": True}
|
||||
|
||||
# Community category popup:
|
||||
createOrEditCommunityCategoryNameInput_TextEdit = {"container": statusDesktop_mainWindow_overlay, "objectName": "createOrEditCommunityCategoryNameInput", "type": "TextEdit", "visible": True}
|
||||
createOrEditCommunityCategoryChannelList_ListView = {"container": statusDesktop_mainWindow_overlay, "objectName": "createOrEditCommunityCategoryChannelList", "type": "StatusListView", "visible": True}
|
||||
createOrEditCommunityCategoryChannelList_ListItem_Placeholder = {"container": createOrEditCommunityCategoryChannelList_ListView, "objectName": "%NAME%", "type": "StatusListItem", "visible": True}
|
||||
createOrEditCommunityCategoryBtn_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createOrEditCommunityCategoryBtn", "type": "StatusButton", "visible": True}
|
||||
|
||||
# Community settings
|
||||
|
|
|
@ -46,7 +46,7 @@ Feature: Status Desktop community
|
|||
| test-channel | Community channel description tested 1 | new-test-channel |
|
||||
|
||||
@mayfail
|
||||
# TODO: Weak. Sometimes passes sometimes fails (standalone or as part of the sequence). To anaylize.
|
||||
# TODO: Weak. Sometimes passes sometimes fails (standalone or as part of the sequence). To analyze.
|
||||
Scenario: The admin deletes a community channel
|
||||
Given the admin creates a community channel named "test-channel2", with description "My description", with the method "bottom_menu"
|
||||
And the channel named "test-channel2" is open
|
||||
|
@ -55,7 +55,7 @@ Feature: Status Desktop community
|
|||
Then the channel count is 1
|
||||
|
||||
@mayfail
|
||||
# TODO: Weak. Sometimes passes sometimes fails (standalone or as part of the sequence). To anaylize.
|
||||
# TODO: Weak. Sometimes passes sometimes fails (standalone or as part of the sequence). To analyze.
|
||||
Scenario Outline: The admin creates a community category
|
||||
Given the admin creates a community channel named "<channel_name>", with description "Some description", with the method "<method>"
|
||||
When the admin creates a community category named "<category_name>", with channels "<channel_name>" and with the method "<method>"
|
||||
|
@ -85,7 +85,7 @@ Feature: Status Desktop community
|
|||
Then the category named "test-category" is missing
|
||||
|
||||
@mayfail
|
||||
# TODO: Weak. Sometimes passes sometimes fails (standalone or as part of the sequence). To anaylize.
|
||||
# TODO: Weak. Sometimes passes sometimes fails (standalone or as part of the sequence). To analyze.
|
||||
# Also TODO: Missing validation of description changed and color changed. Now validation only checks the new community name.
|
||||
Scenario Outline: The admin edits a community
|
||||
When the admin renames the community to "<new_community_name>" and description to "<new_community_description>" and color to "<new_community_color>"
|
||||
|
|
|
@ -24,28 +24,22 @@ Feature: Status Desktop community messages
|
|||
And the user creates a community named "test_community", with description "Community description", intro "community intro" and outro "commmunity outro"
|
||||
Then the user lands on the community named "test_community"
|
||||
|
||||
@mayfail
|
||||
# TODO: Verification is broken.
|
||||
Scenario: The user sends a test image
|
||||
When the user sends a test image in the current channel
|
||||
Then the last chat message contains the test image
|
||||
|
||||
@mayfail
|
||||
# TODO: Verification is broken.
|
||||
Scenario: The user sends a test image with a message
|
||||
When the user sends a test image in the current channel with message "Message" with an image
|
||||
Then the test image is displayed just before the last message
|
||||
And the last chat message contains "Message"
|
||||
|
||||
@mayfail
|
||||
# TODO: Verification is broken and the action of multiple images doesn't work. It is only sent one.
|
||||
# TODO: The action of sending multiple images doesn't work. It is only sent one.
|
||||
Scenario: The user sends multiple test images with a message
|
||||
When the user sends multiple test images in the current channel with message "Message" with an image again
|
||||
Then the test images are displayed just before the last message
|
||||
And the last chat message contains "Message"
|
||||
|
||||
@mayfail
|
||||
# TODO: The action is broken. Review it.
|
||||
Scenario: The user pins and unpins messages
|
||||
# This one wont work until #6554 is fixed
|
||||
# And the amount of pinned messages is 0
|
||||
|
|
|
@ -9,7 +9,6 @@ chatView_editMessageButton = {"container": chatView_log, "objectName": "editMess
|
|||
chatView_editMessageInputComponent = {"container": statusDesktop_mainWindow, "objectName": "editMessageInput", "type": "StatusChatInput", "visible": True}
|
||||
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}
|
||||
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}
|
||||
|
|
|
@ -264,6 +264,8 @@ Item {
|
|||
id: statusChatInfoButton
|
||||
|
||||
StatusChatInfoButton {
|
||||
readonly property string emojiIcon: chatContentModule? chatContentModule.chatDetails.emoji : "" // Needed for test
|
||||
|
||||
objectName: "chatInfoBtnInHeader"
|
||||
title: {
|
||||
const module = root.rootStore.currentChatContentModule()
|
||||
|
@ -305,7 +307,7 @@ Item {
|
|||
Utils.colorForPubkey(chatContentModule.chatDetails.id)
|
||||
: chatContentModule.chatDetails.color
|
||||
: ""
|
||||
asset.emoji: chatContentModule? chatContentModule.chatDetails.emoji : ""
|
||||
asset.emoji: emojiIcon
|
||||
asset.emojiSize: "24x24"
|
||||
type: chatContentModule? chatContentModule.chatDetails.type : Constants.chatType.unknown
|
||||
pinnedMessagesCount: chatContentModule? chatContentModule.pinnedMessagesModel.count : 0
|
||||
|
|
Loading…
Reference in New Issue