From 913738546ba7c1aa733364ecbf88c2aa3513cb7b Mon Sep 17 00:00:00 2001 From: Emily <92288602+burtonemily@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:33:49 +1100 Subject: [PATCH] adding new accessibility ids to message types test --- .../Input View/ExpandingAttachmentsButton.swift | 5 ++++- .../Message Cells/Content Views/VoiceMessageView.swift | 3 ++- Session/Media Viewing & Editing/GIFs/GifPickerCell.swift | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Session/Conversations/Input View/ExpandingAttachmentsButton.swift b/Session/Conversations/Input View/ExpandingAttachmentsButton.swift index a69c823bc..85757803b 100644 --- a/Session/Conversations/Input View/ExpandingAttachmentsButton.swift +++ b/Session/Conversations/Input View/ExpandingAttachmentsButton.swift @@ -27,13 +27,14 @@ final class ExpandingAttachmentsButton: UIView, InputViewButtonDelegate { lazy var gifButton: InputViewButton = { let result = InputViewButton(icon: #imageLiteral(resourceName: "actionsheet_gif_black"), delegate: self, hasOpaqueBackground: true) result.accessibilityIdentifier = "GIF button" - + result.isAccessibilityElement = true return result }() lazy var gifButtonContainer = container(for: gifButton) lazy var documentButton: InputViewButton = { let result = InputViewButton(icon: #imageLiteral(resourceName: "actionsheet_document_black"), delegate: self, hasOpaqueBackground: true) result.accessibilityIdentifier = "Documents folder" + result.isAccessibilityElement = true return result }() @@ -41,6 +42,7 @@ final class ExpandingAttachmentsButton: UIView, InputViewButtonDelegate { lazy var libraryButton: InputViewButton = { let result = InputViewButton(icon: #imageLiteral(resourceName: "actionsheet_camera_roll_black"), delegate: self, hasOpaqueBackground: true) result.accessibilityIdentifier = "Images folder" + result.isAccessibilityElement = true return result }() @@ -48,6 +50,7 @@ final class ExpandingAttachmentsButton: UIView, InputViewButtonDelegate { lazy var cameraButton: InputViewButton = { let result = InputViewButton(icon: #imageLiteral(resourceName: "actionsheet_camera_black"), delegate: self, hasOpaqueBackground: true) result.accessibilityIdentifier = "Select camera button" + result.isAccessibilityElement = true return result }() diff --git a/Session/Conversations/Message Cells/Content Views/VoiceMessageView.swift b/Session/Conversations/Message Cells/Content Views/VoiceMessageView.swift index cdae7fa07..af2f386f8 100644 --- a/Session/Conversations/Message Cells/Content Views/VoiceMessageView.swift +++ b/Session/Conversations/Message Cells/Content Views/VoiceMessageView.swift @@ -98,7 +98,8 @@ public final class VoiceMessageView: UIView { init() { super.init(frame: CGRect.zero) - + self.accessibilityIdentifier = "Voice message" + self.isAccessibilityElement = true setUpViewHierarchy() } diff --git a/Session/Media Viewing & Editing/GIFs/GifPickerCell.swift b/Session/Media Viewing & Editing/GIFs/GifPickerCell.swift index 6bf633e81..37b0b2e15 100644 --- a/Session/Media Viewing & Editing/GIFs/GifPickerCell.swift +++ b/Session/Media Viewing & Editing/GIFs/GifPickerCell.swift @@ -218,6 +218,7 @@ class GifPickerCell: UICollectionViewCell { return } imageView.image = image + imageView.accessibilityIdentifier = "gif cell" self.themeBackgroundColor = nil if self.isCellSelected {