parent
fa5b862d2c
commit
10d53454b3
|
@ -29,6 +29,8 @@ class SidebarComponents(Enum):
|
|||
COMMUNITIES_OPTION: str = "communities_StatusNavigationListItem"
|
||||
PROFILE_OPTION: str = "profile_StatusNavigationListItem"
|
||||
ENS_ITEM: str = "settings_Sidebar_ENS_Item"
|
||||
MESSAGING_ITEM: str = "messaging_StatusNavigationListItem"
|
||||
|
||||
|
||||
class AdvancedOptionScreen(Enum):
|
||||
ACTIVATE_OR_DEACTIVATE_WALLET: str = "walletSettingsLineButton"
|
||||
|
@ -42,6 +44,12 @@ class ENSScreen(Enum):
|
|||
OPEN_TRANSACTION: str = "settings_ENS_Terms_Open_Transaction"
|
||||
TRANSACTION_NEXT_BUTTON: str = "settings_ENS_Terms_Transaction_Next_Button"
|
||||
PASSWORD_INPUT: str = "settings_ENS_Terms_Transaction_Password_Input"
|
||||
|
||||
class MessagingOptionScreen(Enum):
|
||||
ACTIVATE_OR_DEACTIVATE_LINK_PREVIEW: str = "displayMessageLinkPreviewItem"
|
||||
ACTIVATE_OR_DECTIVATE_IMAGE_UNFURLING: str = "imageUnfurlingItem"
|
||||
SCROLLVIEW: str = "settingsContentBase_ScrollView"
|
||||
|
||||
|
||||
class WalletSettingsScreen(Enum):
|
||||
GENERATED_ACCOUNTS: str = "settings_Wallet_MainView_GeneratedAccounts"
|
||||
|
@ -134,6 +142,18 @@ class SettingsScreen:
|
|||
def verify_address(self, address: str):
|
||||
accounts = get_obj(WalletSettingsScreen.GENERATED_ACCOUNTS.value)
|
||||
verify_text_matching_insensitive(accounts.itemAtIndex(0).statusListItemSubTitle, address)
|
||||
|
||||
def open_messaging_settings(self):
|
||||
click_obj_by_name(SidebarComponents.MESSAGING_ITEM.value)
|
||||
|
||||
def activate_link_preview(self):
|
||||
click_obj_by_name(SidebarComponents.MESSAGING_ITEM.value)
|
||||
scroll_obj_by_name(MessagingOptionScreen.SCROLLVIEW.value)
|
||||
scroll_obj_by_name(MessagingOptionScreen.SCROLLVIEW.value)
|
||||
scroll_obj_by_name(MessagingOptionScreen.SCROLLVIEW.value)
|
||||
click_obj_by_name(MessagingOptionScreen.ACTIVATE_OR_DEACTIVATE_LINK_PREVIEW.value)
|
||||
scroll_obj_by_name(MessagingOptionScreen.SCROLLVIEW.value)
|
||||
click_obj_by_name(MessagingOptionScreen.ACTIVATE_OR_DECTIVATE_IMAGE_UNFURLING.value)
|
||||
|
||||
def toggle_test_networks(self):
|
||||
click_obj_by_name(WalletSettingsScreen.NETWORKS_ITEM.value)
|
||||
|
|
|
@ -58,10 +58,15 @@ class ChatComponents(Enum):
|
|||
EDIT_MESSAGE_INPUT = "chatView_editMessageInputComponent"
|
||||
EDIT_MESSAGE_TEXTAREA = "chatView_editMessageInputTextArea"
|
||||
|
||||
GIF_POPUP_BUTTON = "chatView_gifPopupButton"
|
||||
ENABLE_GIF_BUTTON = "gifPopup_enableGifButton"
|
||||
GIF_MOUSEAREA = "gifPopup_gifMouseArea"
|
||||
|
||||
class ChatMessagesHistory(Enum):
|
||||
CHAT_CREATED_TEXT = 1
|
||||
HAS_ADDED_TEXT = 0
|
||||
|
||||
|
||||
class StatusChatScreen:
|
||||
|
||||
def __init__(self):
|
||||
|
@ -85,6 +90,13 @@ class StatusChatScreen:
|
|||
[loaded, _] = is_loaded_visible_and_enabled(ChatComponents.LAST_MESSAGE_TEXT.value)
|
||||
verify_fasle(loaded, "Success: No message was found")
|
||||
|
||||
def send_gif(self):
|
||||
click_obj_by_name(ChatComponents.GIF_POPUP_BUTTON.value)
|
||||
click_obj_by_name(ChatComponents.ENABLE_GIF_BUTTON.value)
|
||||
click_obj_by_name(ChatComponents.GIF_MOUSEAREA.value)
|
||||
press_enter(ChatComponents.MESSAGE_INPUT.value)
|
||||
|
||||
# Verifications region:
|
||||
def verify_last_message_sent(self, message: str):
|
||||
[loaded, last_message_obj] = is_loaded_visible_and_enabled(ChatComponents.LAST_MESSAGE_TEXT.value)
|
||||
verify(loaded, "Checking last message sent: " + message)
|
||||
|
@ -127,7 +139,7 @@ class StatusChatScreen:
|
|||
|
||||
def verify_members_added(self, members):
|
||||
self.verify_total_members_is_displayed_in_toolbar(members)
|
||||
self.verify_added_members_message_is_displayed_in_history( members)
|
||||
self.verify_added_members_message_is_displayed_in_history(members)
|
||||
self.verify_members_are_in_list_panel(members)
|
||||
|
||||
def verify_members_are_in_list_panel(self, members):
|
||||
|
@ -135,7 +147,7 @@ class StatusChatScreen:
|
|||
verify(self.find_member_in_panel(row[0]), "Looking for member: " + row[0])
|
||||
|
||||
def verify_total_members_is_displayed_in_toolbar(self, members):
|
||||
total_members = len(members) + 1 # + Admin
|
||||
total_members = len(members) + 1 # + Admin
|
||||
info_btn_subtitle = str(get_obj(ChatComponents.TOOLBAR_INFO_BUTTON.value).subTitle)
|
||||
subtitle_substrings = info_btn_subtitle.split(' ')
|
||||
verify(int(subtitle_substrings[0]) == total_members, "Expected members are " + str(total_members) + "and they are displayed " + subtitle_substrings[0])
|
||||
|
|
|
@ -21,10 +21,15 @@ emojiPopup_Emoji_Button_Placeholder = {"container": statusDesktop_mainWindow, "o
|
|||
chatInput_Emoji_Button = {"container": statusDesktop_mainWindow, "objectName": "statusChatInputEmojiButton", "type": "StatusFlatRoundButton", "visible": True}
|
||||
chatView_ChatToolbarMoreOptionsButton = {"container": statusDesktop_mainWindow, "objectName": "chatToolbarMoreOptionsButton", "type": "StatusFlatRoundButton"}
|
||||
chatInput_Root = {"container": statusDesktop_mainWindow, "objectName": "statusChatInput", "type": "Rectangle", "visible": True}
|
||||
chatView_gifPopupButton = {"container": statusDesktop_mainWindow, "objectName": "gifPopupButton", "type": "StatusFlatRoundButton", "visible": True}
|
||||
|
||||
# More options menu
|
||||
clearHistoryMenuItem = {"container": statusDesktop_mainWindow_overlay, "objectName": "clearHistoryMenuItem", "type": "StatusMenuItemDelegate", "visible": True}
|
||||
|
||||
# Gif popup:
|
||||
gifPopup_enableGifButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "enableGifsButton", "type": "StatusButton"}
|
||||
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}
|
||||
|
|
|
@ -47,6 +47,8 @@ advanced_StatusNavigationListItem = {"container": mainWindow_ScrollView, "object
|
|||
sign_out_Quit_StatusNavigationListItem = {"container": mainWindow_ScrollView, "objectName": SettingsSubsection.SIGNOUT.value, "type": "StatusNavigationListItem", "visible": True}
|
||||
communities_StatusNavigationListItem = {"container": mainWindow_ScrollView, "objectName": SettingsSubsection.COMMUNITY.value, "type": "StatusNavigationListItem", "visible": True}
|
||||
profile_StatusNavigationListItem = {"container": mainWindow_ScrollView, "objectName": SettingsSubsection.PROFILE.value, "type": "StatusNavigationListItem", "visible": True}
|
||||
messaging_StatusNavigationListItem = {"container": mainWindow_ScrollView, "objectName": SettingsSubsection.MESSAGING.value, "type": "StatusNavigationListItem", "visible": True}
|
||||
|
||||
|
||||
# Profile Settings:
|
||||
displayName_StatusInput = {"container": mainWindow_ScrollView_2, "objectName": "displayNameInput", "type": "StatusInput", "visible": True}
|
||||
|
@ -82,6 +84,11 @@ settings_Wallet_MainView_BackupSeedPhrase = {"container": mainWindow_ScrollView,
|
|||
|
||||
generatedAccounts_ListView = {"container": statusDesktop_mainWindow, "objectName": "generatedAccounts", "type": "ListView"}
|
||||
|
||||
# Messaging Settings:
|
||||
settingsContentBase_ScrollView = {"container": statusDesktop_mainWindow, "objectName": "settingsContentBaseScrollView", "type": "StatusScrollView", "visible": True}
|
||||
displayMessageLinkPreviewItem = {"container": statusDesktop_mainWindow, "objectName": "displayMessageLinkPreviewsItem", "type": "StatusListItem"}
|
||||
imageUnfurlingItem = {"container": statusDesktop_mainWindow, "objectName": "imageUnfurlingItem", "type": "StatusListItem"}
|
||||
|
||||
# Communities Settings:
|
||||
settings_Communities_MainView_LeaveCommunityButtons = {"container": statusDesktop_mainWindow, "objectName":"CommunitiesListPanel_leaveCommunityPopupButton", "type": "StatusBaseButton", "visible": True}
|
||||
settings_Communities_MainView_LeavePopup_LeaveCommunityButton = {"container": statusDesktop_mainWindow, "objectName":"CommunitiesListPanel_leaveCommunityButtonInPopup", "type": "StatusBaseButton", "visible": True}
|
||||
|
|
|
@ -43,6 +43,11 @@ def step(context):
|
|||
for row in table[1:]:
|
||||
_statusChat.send_message(row[0])
|
||||
_statusChat.verify_last_message_sent(row[0])
|
||||
|
||||
@Then("The user is able to send a gif message")
|
||||
def step(context):
|
||||
_statusChat.send_gif()
|
||||
_statusChat.verify_last_message_sent("tenor.gif")
|
||||
|
||||
@Then("the user is able to send a random chat message")
|
||||
def step(context):
|
||||
|
|
|
@ -16,6 +16,14 @@ def step(context: any):
|
|||
def step(context: any):
|
||||
_settingsScreen.open_wallet_settings()
|
||||
|
||||
@When("the user opens the messaging settings")
|
||||
def step(context: any):
|
||||
_settingsScreen.open_messaging_settings()
|
||||
|
||||
@When("the user activates link preview")
|
||||
def step(context: any):
|
||||
_settingsScreen.activate_link_preview()
|
||||
|
||||
@When("the user activates wallet and opens the wallet settings")
|
||||
def step(context: any):
|
||||
_settingsScreen.activate_open_wallet_settings()
|
||||
|
|
|
@ -68,6 +68,14 @@ Feature: Status Desktop Chat
|
|||
| tell me how you do? |
|
||||
When the user clears chat history
|
||||
Then the chat is cleared
|
||||
|
||||
Scenario: User can send a gif
|
||||
When the user opens app settings screen
|
||||
And the user opens the messaging settings
|
||||
And the user activates link preview
|
||||
And the user opens the chat section
|
||||
And user joins chat room automation-test
|
||||
Then The user is able to send a gif message
|
||||
|
||||
|
||||
@mayfail
|
||||
|
|
|
@ -228,6 +228,7 @@ SettingsContentBase {
|
|||
// MESSAGE LINK PREVIEWS
|
||||
StatusListItem {
|
||||
Layout.fillWidth: true
|
||||
objectName: "displayMessageLinkPreviewsItem"
|
||||
title: qsTr("Display Message Link Previews")
|
||||
implicitHeight: 64
|
||||
components: [
|
||||
|
@ -304,6 +305,7 @@ SettingsContentBase {
|
|||
|
||||
// Manually add switch for the image unfurling
|
||||
StatusListItem {
|
||||
objectName: "imageUnfurlingItem"
|
||||
width: parent.width
|
||||
implicitHeight: 64
|
||||
title: qsTr("Image unfurling")
|
||||
|
|
|
@ -101,6 +101,7 @@ Item {
|
|||
|
||||
StatusScrollView {
|
||||
id: scrollView
|
||||
objectName: "settingsContentBaseScrollView"
|
||||
anchors.top: titleRow.visible ? titleRow.bottom : topHeader.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
|
|
|
@ -1220,6 +1220,7 @@ Rectangle {
|
|||
|
||||
StatusQ.StatusFlatRoundButton {
|
||||
id: gifBtn
|
||||
objectName: "gifPopupButton"
|
||||
implicitHeight: 32
|
||||
implicitWidth: 32
|
||||
visible: !isEdit && RootStore.isGifWidgetEnabled
|
||||
|
|
|
@ -106,6 +106,7 @@ Column {
|
|||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
objectName: "gifMouseArea_" + index
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
|
|
@ -260,6 +260,7 @@ Popup {
|
|||
|
||||
StatusButton {
|
||||
id: removeBtn
|
||||
objectName: "enableGifsButton"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
text: qsTr("Enable")
|
||||
|
|
Loading…
Reference in New Issue