From 03712af3b9b0bd94a70ccb4592a3c752fddea3d3 Mon Sep 17 00:00:00 2001 From: Valentina1133 <141633821+Valentina1133@users.noreply.github.com> Date: Mon, 20 May 2024 17:11:37 +0700 Subject: [PATCH] chore: add object names for links preview and add button (#14853) --- ui/app/AppLayouts/Profile/popups/AddSocialLinkModal.qml | 1 + ui/imports/shared/controls/chat/LinkPreviewSettingsCard.qml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ui/app/AppLayouts/Profile/popups/AddSocialLinkModal.qml b/ui/app/AppLayouts/Profile/popups/AddSocialLinkModal.qml index 76ab431716..ada1ceec25 100644 --- a/ui/app/AppLayouts/Profile/popups/AddSocialLinkModal.qml +++ b/ui/app/AppLayouts/Profile/popups/AddSocialLinkModal.qml @@ -29,6 +29,7 @@ StatusStackModal { rightButtons: [finishButton] finishButton: StatusButton { text: qsTr("Add") + objectName: "addButton" enabled: linkTarget.valid && (!customTitle.visible || customTitle.valid) onClicked: { root.addLinkRequested(d.selectedLinkTypeText || customTitle.text, // text for custom link, otherwise the link typeId diff --git a/ui/imports/shared/controls/chat/LinkPreviewSettingsCard.qml b/ui/imports/shared/controls/chat/LinkPreviewSettingsCard.qml index 7a80a61398..23f1781a35 100644 --- a/ui/imports/shared/controls/chat/LinkPreviewSettingsCard.qml +++ b/ui/imports/shared/controls/chat/LinkPreviewSettingsCard.qml @@ -122,12 +122,14 @@ CalloutCard { StatusAction { text: qsTr("Show for this message") + objectName: "showForThisMessagePreviewMenuItem" icon.name: "show" onTriggered: contextMenu.enableLinkPreviewForThisMessage() } StatusAction { text: qsTr("Always show previews") + objectName: "alwaysShowPreviewMenuItem" icon.name: "show" onTriggered: contextMenu.enableLinkPreview() } @@ -136,6 +138,7 @@ CalloutCard { StatusAction { text: qsTr("Never show previews") + objectName: "neverShowPreviewsMenuItem" icon.name: "hide" type: StatusAction.Type.Danger onTriggered: contextMenu.disableLinkPreview()