diff --git a/.github/workflows/cron-checks.yml b/.github/workflows/cron-checks.yml index 91436b568..ffccc8e09 100644 --- a/.github/workflows/cron-checks.yml +++ b/.github/workflows/cron-checks.yml @@ -21,8 +21,8 @@ jobs: strategy: matrix: include: - - ios: 18.3 - xcode: 16.3 + - ios: 18.5 + xcode: 16.4 os: macos-15 device: "iPhone 16 Pro" setup_runtime: false @@ -91,14 +91,10 @@ jobs: strategy: matrix: include: - - xcode: 16.3 - os: macos-15 - - xcode: 16.2 + - xcode: 16.4 os: macos-15 - xcode: 16.1 - os: macos-15 - - xcode: 16.0 - os: macos-15 + os: macos-14 fail-fast: false runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/smoke-checks.yml b/.github/workflows/smoke-checks.yml index daaae8108..ba2278704 100644 --- a/.github/workflows/smoke-checks.yml +++ b/.github/workflows/smoke-checks.yml @@ -20,7 +20,7 @@ concurrency: env: HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI - IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.3)" + IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.5)" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_PR_NUM: ${{ github.event.pull_request.number }} @@ -28,6 +28,7 @@ jobs: build-test-app-and-frameworks: name: Build Test App and Frameworks runs-on: macos-15 + if: ${{ github.event.inputs.record_snapshots != 'true' }} steps: - uses: actions/checkout@v4.1.1 - uses: ./.github/actions/ruby-cache diff --git a/CHANGELOG.md b/CHANGELOG.md index b105d40f4..eb8526a5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### 🔄 Changed +# [4.86.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.86.0) +_August 21, 2025_ + +### 🐞 Fixed +- Fix inconsistencies in gallery view displaying images and videos [927](https://github.com/GetStream/stream-chat-swiftui/pull/927) +- Prevent audio messages increasing width in reply mode [#926](https://github.com/GetStream/stream-chat-swiftui/pull/926) + # [4.85.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.85.0) _August 13, 2025_ diff --git a/Package.swift b/Package.swift index 7a56197b7..2aafefabc 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( ) ], dependencies: [ - .package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.85.0") + .package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.86.0") ], targets: [ .target( diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsView.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsView.swift index 6294bcf42..449604bf8 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsView.swift @@ -54,25 +54,17 @@ public struct MediaAttachmentsView: View { ForEach(0..: View { } } -struct ImageAttachmentContentView: View { +struct MediaAttachmentContentView: View { @State private var galleryShown = false let factory: Factory let mediaItem: MediaItem - let imageAttachment: ChatMessageImageAttachment - let allImageAttachments: [ChatMessageImageAttachment] + let mediaAttachment: MediaAttachment + let allMediaAttachments: [MediaAttachment] let itemWidth: CGFloat let index: Int @@ -125,7 +117,7 @@ struct ImageAttachmentContentView: View { galleryShown = true } label: { LazyLoadingImage( - source: MediaAttachment(url: imageAttachment.imageURL, type: .image), + source: mediaAttachment, width: itemWidth, height: itemWidth ) @@ -137,7 +129,7 @@ struct ImageAttachmentContentView: View { } .fullScreenCover(isPresented: $galleryShown) { factory.makeGalleryView( - mediaAttachments: allImageAttachments.map { MediaAttachment(from: $0) }, + mediaAttachments: allMediaAttachments, message: mediaItem.message, isShown: $galleryShown, options: .init(selectedIndex: index) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsViewModel.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsViewModel.swift index 3ba569c5b..2b30405fb 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsViewModel.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MediaAttachmentsViewModel.swift @@ -19,8 +19,8 @@ class MediaAttachmentsViewModel: ObservableObject, ChatMessageSearchControllerDe private var loadingNextMessages = false - var allImageAttachments: [ChatMessageImageAttachment] { - mediaItems.compactMap(\.imageAttachment) + var allMediaAttachments: [MediaAttachment] { + mediaItems.compactMap(\.mediaAttachment) } init(channel: ChatChannel) { @@ -113,4 +113,13 @@ struct MediaItem: Identifiable { var videoAttachment: ChatMessageVideoAttachment? var imageAttachment: ChatMessageImageAttachment? + + var mediaAttachment: MediaAttachment? { + if let videoAttachment { + return MediaAttachment(url: videoAttachment.videoURL, type: .video) + } else if let imageAttachment { + return MediaAttachment(url: imageAttachment.imageURL, type: .image) + } + return nil + } } diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GalleryView.swift b/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GalleryView.swift index b87b25362..d8ca25449 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GalleryView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GalleryView.swift @@ -127,8 +127,8 @@ public struct GalleryView: View { .foregroundColor(Color(colors.text)) } .sheet(isPresented: $gridShown) { - GridPhotosView( - imageURLs: mediaAttachments.filter { $0.type == .image }.map(\.url), + GridMediaView( + attachments: mediaAttachments, isShown: $gridShown ) } diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GridPhotosView.swift b/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GridMediaView.swift similarity index 84% rename from Sources/StreamChatSwiftUI/ChatChannel/Gallery/GridPhotosView.swift rename to Sources/StreamChatSwiftUI/ChatChannel/Gallery/GridMediaView.swift index f6d68f017..b3b343036 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GridPhotosView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Gallery/GridMediaView.swift @@ -5,9 +5,9 @@ import StreamChat import SwiftUI -/// View used for displaying photos in a grid. -struct GridPhotosView: View { - var imageURLs: [URL] +/// View used for displaying media in a grid. +struct GridMediaView: View { + var attachments: [MediaAttachment] @Binding var isShown: Bool private static let spacing: CGFloat = 2 @@ -30,9 +30,9 @@ struct GridPhotosView: View { ) ScrollView { LazyVGrid(columns: columns, spacing: 2) { - ForEach(imageURLs, id: \.self) { url in + ForEach(attachments) { attachment in LazyLoadingImage( - source: MediaAttachment(url: url, type: .image), + source: attachment, width: Self.itemWidth, height: Self.itemWidth ) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/MessageList/ImageAttachmentView.swift b/Sources/StreamChatSwiftUI/ChatChannel/MessageList/ImageAttachmentView.swift index 1f09486cc..c9a882657 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/MessageList/ImageAttachmentView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/MessageList/ImageAttachmentView.swift @@ -430,13 +430,17 @@ extension ChatMessage { } } -public struct MediaAttachment { +public struct MediaAttachment: Identifiable { @Injected(\.utils) var utils let url: URL let type: MediaAttachmentType var uploadingState: AttachmentUploadingState? + public var id: String { + url.absoluteString + } + func generateThumbnail( resize: Bool, preferredSize: CGSize, diff --git a/Sources/StreamChatSwiftUI/ChatChannel/MessageList/QuotedMessageView.swift b/Sources/StreamChatSwiftUI/ChatChannel/MessageList/QuotedMessageView.swift index ac18080bf..97847ae96 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/MessageList/QuotedMessageView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/MessageList/QuotedMessageView.swift @@ -134,11 +134,13 @@ public struct QuotedMessageView: View { Text("📊 \(poll.name)") } - Text(textForMessage) - .foregroundColor(textColor(for: quotedMessage)) - .lineLimit(3) - .font(fonts.footnote) - .accessibility(identifier: "quotedMessageText") + if !hasVoiceAttachments { + Text(textForMessage) + .foregroundColor(textColor(for: quotedMessage)) + .lineLimit(3) + .font(fonts.footnote) + .accessibility(identifier: "quotedMessageText") + } if fillAvailableSpace { Spacer() diff --git a/Sources/StreamChatSwiftUI/Generated/SystemEnvironment+Version.swift b/Sources/StreamChatSwiftUI/Generated/SystemEnvironment+Version.swift index cb7e80727..549d7671e 100644 --- a/Sources/StreamChatSwiftUI/Generated/SystemEnvironment+Version.swift +++ b/Sources/StreamChatSwiftUI/Generated/SystemEnvironment+Version.swift @@ -7,5 +7,5 @@ import Foundation enum SystemEnvironment { /// A Stream Chat version. - public static let version: String = "4.85.0" + public static let version: String = "4.86.0" } diff --git a/Sources/StreamChatSwiftUI/Info.plist b/Sources/StreamChatSwiftUI/Info.plist index c1ab0cfed..21853bfa2 100644 --- a/Sources/StreamChatSwiftUI/Info.plist +++ b/Sources/StreamChatSwiftUI/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 4.85.0 + 4.86.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPhotoLibraryUsageDescription diff --git a/StreamChatSwiftUI-XCFramework.podspec b/StreamChatSwiftUI-XCFramework.podspec index 0a1b58e4d..b78dad513 100644 --- a/StreamChatSwiftUI-XCFramework.podspec +++ b/StreamChatSwiftUI-XCFramework.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'StreamChatSwiftUI-XCFramework' - spec.version = '4.85.0' + spec.version = '4.86.0' spec.summary = 'StreamChat SwiftUI Chat Components' spec.description = 'StreamChatSwiftUI SDK offers flexible SwiftUI components able to display data provided by StreamChat SDK.' @@ -19,7 +19,7 @@ Pod::Spec.new do |spec| spec.framework = 'Foundation', 'UIKit', 'SwiftUI' - spec.dependency 'StreamChat-XCFramework', '~> 4.85.0' + spec.dependency 'StreamChat-XCFramework', '~> 4.86.0' spec.cocoapods_version = '>= 1.11.0' end diff --git a/StreamChatSwiftUI.podspec b/StreamChatSwiftUI.podspec index 571b7bc51..de7f95e9e 100644 --- a/StreamChatSwiftUI.podspec +++ b/StreamChatSwiftUI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'StreamChatSwiftUI' - spec.version = '4.85.0' + spec.version = '4.86.0' spec.summary = 'StreamChat SwiftUI Chat Components' spec.description = 'StreamChatSwiftUI SDK offers flexible SwiftUI components able to display data provided by StreamChat SDK.' @@ -19,5 +19,5 @@ Pod::Spec.new do |spec| spec.framework = 'Foundation', 'UIKit', 'SwiftUI' - spec.dependency 'StreamChat', '~> 4.85.0' + spec.dependency 'StreamChat', '~> 4.86.0' end diff --git a/StreamChatSwiftUI.xcodeproj/project.pbxproj b/StreamChatSwiftUI.xcodeproj/project.pbxproj index 216ac08c3..169af8f8f 100644 --- a/StreamChatSwiftUI.xcodeproj/project.pbxproj +++ b/StreamChatSwiftUI.xcodeproj/project.pbxproj @@ -193,7 +193,7 @@ 84335014274BAB15007A1B81 /* ViewFactoryExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84335013274BAB15007A1B81 /* ViewFactoryExamples.swift */; }; 84335016274BABF3007A1B81 /* NewChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84335015274BABF3007A1B81 /* NewChatView.swift */; }; 84335018274BAD4B007A1B81 /* NewChatViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84335017274BAD4B007A1B81 /* NewChatViewModel.swift */; }; - 8434E58127707F19001E1B83 /* GridPhotosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8434E58027707F19001E1B83 /* GridPhotosView.swift */; }; + 8434E58127707F19001E1B83 /* GridMediaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8434E58027707F19001E1B83 /* GridMediaView.swift */; }; 8434E583277088D9001E1B83 /* TitleWithCloseButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8434E582277088D9001E1B83 /* TitleWithCloseButton.swift */; }; 84471C182BE98BC400D6721E /* PollAllOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84471C172BE98BC400D6721E /* PollAllOptionsView.swift */; }; 844CC60E2811378D0006548D /* ComposerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844CC60D2811378D0006548D /* ComposerConfig.swift */; }; @@ -449,7 +449,7 @@ 84DEC8EA2761089A00172876 /* MessageThreadHeaderViewModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84DEC8E92761089A00172876 /* MessageThreadHeaderViewModifier.swift */; }; 84DEC8EC27611CAE00172876 /* SendInChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84DEC8EB27611CAE00172876 /* SendInChannelView.swift */; }; 84E04789284A444E00BAFA17 /* AnyEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D2127579359007FE2B9 /* AnyEndpoint.swift */; }; - 84E0478A284A444E00BAFA17 /* StreamChatUtilsMocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D5B275A2E9F007FE2B9 /* StreamChatUtilsMocks.swift */; }; + 84E0478A284A444E00BAFA17 /* VideoPreviewLoader_Mock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D5B275A2E9F007FE2B9 /* VideoPreviewLoader_Mock.swift */; }; 84E0478B284A444E00BAFA17 /* VirtualTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D272757954C007FE2B9 /* VirtualTimer.swift */; }; 84E0478C284A444E00BAFA17 /* TestRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D1927579273007FE2B9 /* TestRequest.swift */; }; 84E0478D284A444E00BAFA17 /* ImageLoader_Mock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D452757D1CA007FE2B9 /* ImageLoader_Mock.swift */; }; @@ -797,7 +797,7 @@ 84335013274BAB15007A1B81 /* ViewFactoryExamples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewFactoryExamples.swift; sourceTree = ""; }; 84335015274BABF3007A1B81 /* NewChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewChatView.swift; sourceTree = ""; }; 84335017274BAD4B007A1B81 /* NewChatViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewChatViewModel.swift; sourceTree = ""; }; - 8434E58027707F19001E1B83 /* GridPhotosView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GridPhotosView.swift; sourceTree = ""; }; + 8434E58027707F19001E1B83 /* GridMediaView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GridMediaView.swift; sourceTree = ""; }; 8434E582277088D9001E1B83 /* TitleWithCloseButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleWithCloseButton.swift; sourceTree = ""; }; 84471C172BE98BC400D6721E /* PollAllOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollAllOptionsView.swift; sourceTree = ""; }; 844CC60D2811378D0006548D /* ComposerConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerConfig.swift; sourceTree = ""; }; @@ -1046,7 +1046,7 @@ 84C94D55275A1AE1007FE2B9 /* StringExtensions_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions_Tests.swift; sourceTree = ""; }; 84C94D57275A1B89007FE2B9 /* MessageTypeResolver_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTypeResolver_Tests.swift; sourceTree = ""; }; 84C94D59275A2E43007FE2B9 /* StreamChat_Utils_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreamChat_Utils_Tests.swift; sourceTree = ""; }; - 84C94D5B275A2E9F007FE2B9 /* StreamChatUtilsMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreamChatUtilsMocks.swift; sourceTree = ""; }; + 84C94D5B275A2E9F007FE2B9 /* VideoPreviewLoader_Mock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoPreviewLoader_Mock.swift; sourceTree = ""; }; 84C94D5D275A3AA9007FE2B9 /* ImageCDN_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCDN_Tests.swift; sourceTree = ""; }; 84C94D5F275A45D2007FE2B9 /* ViewFactory_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewFactory_Tests.swift; sourceTree = ""; }; 84C94D61275A5BB7007FE2B9 /* ChatChannelNamer_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatChannelNamer_Tests.swift; sourceTree = ""; }; @@ -2099,7 +2099,7 @@ 84C94D29275796D0007FE2B9 /* MockNetworkURLProtocol.swift */, 84C94D2B275796F7007FE2B9 /* RequestRecorderURLProtocol.swift */, 84C94D452757D1CA007FE2B9 /* ImageLoader_Mock.swift */, - 84C94D5B275A2E9F007FE2B9 /* StreamChatUtilsMocks.swift */, + 84C94D5B275A2E9F007FE2B9 /* VideoPreviewLoader_Mock.swift */, 847BA08227E0B9C600ED20C7 /* EventBatcherMock.swift */, 847BA08427E0BA2500ED20C7 /* EventNotificationCenterMock.swift */, 847BA08627E0BACB00ED20C7 /* WebSocketPingControllerMock.swift */, @@ -2261,7 +2261,7 @@ isa = PBXGroup; children = ( 84F29089276B90610045472D /* GalleryView.swift */, - 8434E58027707F19001E1B83 /* GridPhotosView.swift */, + 8434E58027707F19001E1B83 /* GridMediaView.swift */, 8465FD032746A95600AF091E /* VideoPlayerView.swift */, C52A0B5E2E1557F300176379 /* VideoPlayerFooterView.swift */, 84F2908B276B91700045472D /* ZoomableScrollView.swift */, @@ -2717,7 +2717,7 @@ 842FA0E72C05DCDB00AD1F3C /* PollsConfig.swift in Sources */, 841B64D42775F5540016FF3B /* GiphyCommandHandler.swift in Sources */, 82D64BDD2AD7E5B700C5C79E /* AnimatedImageView.swift in Sources */, - 8434E58127707F19001E1B83 /* GridPhotosView.swift in Sources */, + 8434E58127707F19001E1B83 /* GridMediaView.swift in Sources */, ADE0F5662CB962470053B8B9 /* ActionBannerView.swift in Sources */, 84BB4C4C2841104700CBE004 /* MessageListDateUtils.swift in Sources */, 82D64BE72AD7E5B700C5C79E /* ImageTask.swift in Sources */, @@ -3099,7 +3099,7 @@ 84C94D422757C16D007FE2B9 /* ChatChannelListTestHelpers.swift in Sources */, 84BB4C4E284115C200CBE004 /* MessageListDateUtils_Tests.swift in Sources */, 84C94D5A275A2E43007FE2B9 /* StreamChat_Utils_Tests.swift in Sources */, - 84E0478A284A444E00BAFA17 /* StreamChatUtilsMocks.swift in Sources */, + 84E0478A284A444E00BAFA17 /* VideoPreviewLoader_Mock.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3908,7 +3908,7 @@ repositoryURL = "https://github.com/GetStream/stream-chat-swift.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 4.85.0; + minimumVersion = 4.86.0; }; }; E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { diff --git a/StreamChatSwiftUIArtifacts.json b/StreamChatSwiftUIArtifacts.json index 6c4575928..cfd95bd1c 100644 --- a/StreamChatSwiftUIArtifacts.json +++ b/StreamChatSwiftUIArtifacts.json @@ -1 +1 @@ -{"4.40.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.40.0/StreamChatSwiftUI.zip","4.41.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.41.0/StreamChatSwiftUI.zip","4.42.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.42.0/StreamChatSwiftUI.zip","4.43.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.43.0/StreamChatSwiftUI.zip","4.44.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.44.0/StreamChatSwiftUI.zip","4.45.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.45.0/StreamChatSwiftUI.zip","4.46.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.46.0/StreamChatSwiftUI.zip","4.47.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.0/StreamChatSwiftUI.zip","4.47.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.1/StreamChatSwiftUI.zip","4.48.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.48.0/StreamChatSwiftUI.zip","4.49.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.49.0/StreamChatSwiftUI.zip","4.50.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.0/StreamChatSwiftUI.zip","4.50.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.1/StreamChatSwiftUI.zip","4.51.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.51.0/StreamChatSwiftUI.zip","4.52.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.52.0/StreamChatSwiftUI.zip","4.53.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.53.0/StreamChatSwiftUI.zip","4.54.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.54.0/StreamChatSwiftUI.zip","4.55.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.55.0/StreamChatSwiftUI.zip","4.56.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.56.0/StreamChatSwiftUI.zip","4.57.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.57.0/StreamChatSwiftUI.zip","4.58.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.58.0/StreamChatSwiftUI.zip","4.59.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.59.0/StreamChatSwiftUI.zip","4.60.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.60.0/StreamChatSwiftUI.zip","4.61.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.61.0/StreamChatSwiftUI.zip","4.62.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.62.0/StreamChatSwiftUI.zip","4.63.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.63.0/StreamChatSwiftUI.zip","4.64.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.64.0/StreamChatSwiftUI.zip","4.65.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.65.0/StreamChatSwiftUI.zip","4.66.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.66.0/StreamChatSwiftUI.zip","4.67.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.67.0/StreamChatSwiftUI.zip","4.68.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.68.0/StreamChatSwiftUI.zip","4.69.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.69.0/StreamChatSwiftUI.zip","4.70.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.70.0/StreamChatSwiftUI.zip","4.71.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.71.0/StreamChatSwiftUI.zip","4.72.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.72.0/StreamChatSwiftUI.zip","4.73.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.73.0/StreamChatSwiftUI.zip","4.74.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.74.0/StreamChatSwiftUI.zip","4.75.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.75.0/StreamChatSwiftUI.zip","4.76.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.76.0/StreamChatSwiftUI.zip","4.77.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.77.0/StreamChatSwiftUI.zip","4.78.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.78.0/StreamChatSwiftUI.zip","4.79.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.79.0/StreamChatSwiftUI.zip","4.79.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.79.1/StreamChatSwiftUI.zip","4.80.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.80.0/StreamChatSwiftUI.zip","4.81.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.81.0/StreamChatSwiftUI.zip","4.82.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.82.0/StreamChatSwiftUI.zip","4.83.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.83.0/StreamChatSwiftUI.zip","4.84.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.84.0/StreamChatSwiftUI.zip","4.85.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.85.0/StreamChatSwiftUI.zip"} \ No newline at end of file +{"4.40.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.40.0/StreamChatSwiftUI.zip","4.41.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.41.0/StreamChatSwiftUI.zip","4.42.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.42.0/StreamChatSwiftUI.zip","4.43.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.43.0/StreamChatSwiftUI.zip","4.44.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.44.0/StreamChatSwiftUI.zip","4.45.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.45.0/StreamChatSwiftUI.zip","4.46.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.46.0/StreamChatSwiftUI.zip","4.47.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.0/StreamChatSwiftUI.zip","4.47.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.1/StreamChatSwiftUI.zip","4.48.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.48.0/StreamChatSwiftUI.zip","4.49.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.49.0/StreamChatSwiftUI.zip","4.50.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.0/StreamChatSwiftUI.zip","4.50.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.1/StreamChatSwiftUI.zip","4.51.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.51.0/StreamChatSwiftUI.zip","4.52.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.52.0/StreamChatSwiftUI.zip","4.53.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.53.0/StreamChatSwiftUI.zip","4.54.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.54.0/StreamChatSwiftUI.zip","4.55.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.55.0/StreamChatSwiftUI.zip","4.56.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.56.0/StreamChatSwiftUI.zip","4.57.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.57.0/StreamChatSwiftUI.zip","4.58.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.58.0/StreamChatSwiftUI.zip","4.59.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.59.0/StreamChatSwiftUI.zip","4.60.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.60.0/StreamChatSwiftUI.zip","4.61.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.61.0/StreamChatSwiftUI.zip","4.62.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.62.0/StreamChatSwiftUI.zip","4.63.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.63.0/StreamChatSwiftUI.zip","4.64.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.64.0/StreamChatSwiftUI.zip","4.65.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.65.0/StreamChatSwiftUI.zip","4.66.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.66.0/StreamChatSwiftUI.zip","4.67.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.67.0/StreamChatSwiftUI.zip","4.68.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.68.0/StreamChatSwiftUI.zip","4.69.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.69.0/StreamChatSwiftUI.zip","4.70.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.70.0/StreamChatSwiftUI.zip","4.71.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.71.0/StreamChatSwiftUI.zip","4.72.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.72.0/StreamChatSwiftUI.zip","4.73.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.73.0/StreamChatSwiftUI.zip","4.74.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.74.0/StreamChatSwiftUI.zip","4.75.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.75.0/StreamChatSwiftUI.zip","4.76.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.76.0/StreamChatSwiftUI.zip","4.77.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.77.0/StreamChatSwiftUI.zip","4.78.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.78.0/StreamChatSwiftUI.zip","4.79.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.79.0/StreamChatSwiftUI.zip","4.79.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.79.1/StreamChatSwiftUI.zip","4.80.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.80.0/StreamChatSwiftUI.zip","4.81.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.81.0/StreamChatSwiftUI.zip","4.82.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.82.0/StreamChatSwiftUI.zip","4.83.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.83.0/StreamChatSwiftUI.zip","4.84.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.84.0/StreamChatSwiftUI.zip","4.85.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.85.0/StreamChatSwiftUI.zip","4.86.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.86.0/StreamChatSwiftUI.zip"} \ No newline at end of file diff --git a/StreamChatSwiftUITests/Infrastructure/Mocks/ImageLoader_Mock.swift b/StreamChatSwiftUITests/Infrastructure/Mocks/ImageLoader_Mock.swift index d34382f67..a0bea90c9 100644 --- a/StreamChatSwiftUITests/Infrastructure/Mocks/ImageLoader_Mock.swift +++ b/StreamChatSwiftUITests/Infrastructure/Mocks/ImageLoader_Mock.swift @@ -6,9 +6,12 @@ import Foundation @testable import StreamChat import StreamChatSwiftUI import UIKit +import XCTest +/// Mock implementation of `ImageLoading`. class ImageLoader_Mock: ImageLoading { - static let defaultLoadedImage = UIImage(systemName: "checkmark")! + static let defaultLoadedImage = XCTestCase.TestImages.yoda.image + var loadImageCalled = false func loadImage( url: URL?, @@ -17,6 +20,8 @@ class ImageLoader_Mock: ImageLoading { preferredSize: CGSize?, completion: @escaping ((Result) -> Void) ) { + loadImageCalled = true + completion(.success(Self.defaultLoadedImage)) } @@ -28,9 +33,8 @@ class ImageLoader_Mock: ImageLoading { imageCDN: ImageCDN, completion: @escaping (([UIImage]) -> Void) ) { - let result = urls.map { _ in - Self.defaultLoadedImage - } - completion(result) + loadImageCalled = true + + completion([Self.defaultLoadedImage]) } } diff --git a/StreamChatSwiftUITests/Infrastructure/Mocks/StreamChatUtilsMocks.swift b/StreamChatSwiftUITests/Infrastructure/Mocks/VideoPreviewLoader_Mock.swift similarity index 52% rename from StreamChatSwiftUITests/Infrastructure/Mocks/StreamChatUtilsMocks.swift rename to StreamChatSwiftUITests/Infrastructure/Mocks/VideoPreviewLoader_Mock.swift index 7a7c33a4a..b0e945dd0 100644 --- a/StreamChatSwiftUITests/Infrastructure/Mocks/StreamChatUtilsMocks.swift +++ b/StreamChatSwiftUITests/Infrastructure/Mocks/VideoPreviewLoader_Mock.swift @@ -4,6 +4,7 @@ import StreamChatSwiftUI import UIKit +import XCTest /// Mock implementation of `VideoPreviewLoader`. class VideoPreviewLoader_Mock: VideoPreviewLoader { @@ -11,20 +12,7 @@ class VideoPreviewLoader_Mock: VideoPreviewLoader { func loadPreviewForVideo(at url: URL, completion: @escaping (Result) -> Void) { loadPreviewVideoCalled = true - } -} - -/// Mock implementation of `ImageLoading`. -class ImageLoaderUtils_Mock: ImageLoading { - var loadImageCalled = false - func loadImage( - url: URL?, - imageCDN: ImageCDN, - resize: Bool, - preferredSize: CGSize?, - completion: @escaping ((Result) -> Void) - ) { - loadImageCalled = true + completion(.success(ImageLoader_Mock.defaultLoadedImage)) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsViewModel_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsViewModel_Tests.swift index 0183b5a03..8f4a5469a 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsViewModel_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsViewModel_Tests.swift @@ -27,7 +27,7 @@ class MediaAttachmentsViewModel_Tests: StreamChatTestCase { // When let mediaItems = viewModel.mediaItems - let imageAttachments = viewModel.allImageAttachments + let imageAttachments = viewModel.allMediaAttachments.filter { $0.type == .image } // Then XCTAssert(mediaItems.count == 8) diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift index 2766af6ca..959c7b486 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift @@ -10,12 +10,6 @@ import SwiftUI import XCTest class PinnedMessagesView_Tests: StreamChatTestCase { - override func setUp() { - super.setUp() - let utils = Utils(dateFormatter: EmptyDateFormatter()) - streamChat = StreamChat(chatClient: chatClient, utils: utils) - } - func test_pinnedMessagesView_notEmptySnapshot() { // Given let channel = ChatChannel.mockDMChannel( diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/MediaAttachmentsView_Tests/test_mediaAttachmentsView_notEmptySnapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/MediaAttachmentsView_Tests/test_mediaAttachmentsView_notEmptySnapshot.1.png index 3a6c74230..10ccf26a0 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/MediaAttachmentsView_Tests/test_mediaAttachmentsView_notEmptySnapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/MediaAttachmentsView_Tests/test_mediaAttachmentsView_notEmptySnapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_imageSnapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_imageSnapshot.1.png index e435874d6..2ef661be7 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_imageSnapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_imageSnapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_notEmptySnapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_notEmptySnapshot.1.png index 26ffb6eab..d481c0026 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_notEmptySnapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_notEmptySnapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_pollSnapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_pollSnapshot.1.png index b5c373974..8fa18d02e 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_pollSnapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_pollSnapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_videoSnapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_videoSnapshot.1.png index 30676de34..d29488364 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_videoSnapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/__Snapshots__/PinnedMessagesView_Tests/test_pinnedMessagesView_videoSnapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelTestHelpers.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelTestHelpers.swift index 6d20e4b51..e90837dde 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelTestHelpers.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelTestHelpers.swift @@ -41,8 +41,9 @@ class ChatChannelTestHelpers { channelController.simulateInitial(channel: channel, messages: channelMessages, state: .initialized) return channelController } - - static let testURL = URL(string: "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg")! + + static let testURL = URL.localYodaImage + static let testFileURL = URL.localYodaQuote static var imageAttachments: [AnyChatMessageAttachment] = { let attachmentFile = AttachmentFile(type: .png, size: 0, mimeType: "image/png") @@ -225,8 +226,8 @@ class ChatChannelTestHelpers { let title = index == 0 ? "Recording" : "Recording-\(index)" let payload = VoiceRecordingAttachmentPayload( title: title, - voiceRecordingRemoteURL: .localYodaImage, - file: try! .init(url: .localYodaImage), + voiceRecordingRemoteURL: testURL, + file: try! .init(url: testFileURL), duration: Double(index) + 5.0, waveformData: [0, 0.1, 0.5, 1], extraData: nil diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift index 3b18a1dd3..0ea0793c5 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift @@ -13,11 +13,9 @@ import XCTest class ChatChannelView_Tests: StreamChatTestCase { override func setUp() { super.setUp() - let utils = Utils(dateFormatter: EmptyDateFormatter()) - streamChat = StreamChat(chatClient: chatClient, utils: utils) DelayedRenderingViewModifier.isEnabled = false } - + override func tearDown() { super.tearDown() DelayedRenderingViewModifier.isEnabled = true diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift index c69d6b68e..47f3644f1 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift @@ -48,8 +48,23 @@ class GalleryView_Tests: StreamChatTestCase { func test_gridView_snapshotLoading() { // Given - let view = GridPhotosView( - imageURLs: [ChatChannelTestHelpers.testURL], + let view = GridMediaView( + attachments: [MediaAttachment(url: ChatChannelTestHelpers.testURL, type: .image)], + isShown: .constant(true) + ) + .applyDefaultSize() + + // Then + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) + } + + func test_gridViewVideoAndImage_snapshotLoading() { + // Given + let view = GridMediaView( + attachments: [ + MediaAttachment(url: ChatChannelTestHelpers.testURL, type: .image), + MediaAttachment(url: ChatChannelTestHelpers.testURL.appendingPathComponent("test"), type: .video) + ], isShown: .constant(true) ) .applyDefaultSize() diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift index fefaa171d..9f0aeeade 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift @@ -23,7 +23,7 @@ final class LazyImageExtensions_Tests: StreamChatTestCase { func test_imageURL_nonEmpty() { // Given let lazyImageView = LazyImage( - imageURL: URL(string: "https://vignette.wikia.nocookie.net/starwars/images/2/20/LukeTLJ.jpg") + imageURL: .localYodaImage ) .applyDefaultSize() diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift index 0f6e4b6eb..37c72534f 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift @@ -11,12 +11,6 @@ import SwiftUI import XCTest class MessageContainerView_Tests: StreamChatTestCase { - override func setUp() { - super.setUp() - let utils = Utils(dateFormatter: EmptyDateFormatter()) - streamChat = StreamChat(chatClient: chatClient, utils: utils) - } - func test_messageContainerViewSentThisUser_snapshot() { // Given let message = ChatMessage.mock( @@ -36,8 +30,6 @@ class MessageContainerView_Tests: StreamChatTestCase { func test_messageContainerEdited_snapshot() { // Given - let utils = Utils(dateFormatter: EmptyDateFormatter()) - streamChat = StreamChat(chatClient: chatClient, utils: utils) let message = ChatMessage.mock( id: .unique, cid: .unique, diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift index e2193ffea..5aab05654 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift @@ -65,7 +65,7 @@ class QuotedMessageView_Tests: StreamChatTestCase { let payload = VoiceRecordingAttachmentPayload( title: "Recording", voiceRecordingRemoteURL: .localYodaImage, - file: try! .init(url: .localYodaImage), + file: try! .init(url: .localYodaQuote), duration: 3, waveformData: [0, 0.3, 0.6, 1], extraData: nil @@ -77,4 +77,40 @@ class QuotedMessageView_Tests: StreamChatTestCase { // Then assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } + + func test_quotedMessageView_voiceAttachmentWithTextSnapshot() { + // Given + let payload = VoiceRecordingAttachmentPayload( + title: "Recording", + voiceRecordingRemoteURL: .localYodaImage, + file: try! .init(url: .localYodaQuote), + duration: 3, + waveformData: [0, 0.3, 0.6, 1], + extraData: nil + ) + let viewSize = CGSize(width: 200, height: 50) + let message = ChatMessage.mock( + text: "Hello, how are you?", + deletedAt: .unique, + attachments: [ + ChatMessageVoiceRecordingAttachment( + id: .unique, + type: .voiceRecording, + payload: payload, + downloadingState: nil, + uploadingState: nil + ).asAnyAttachment + ] + ) + let view = QuotedMessageView( + factory: DefaultViewFactory.shared, + quotedMessage: message, + fillAvailableSpace: true, + forceLeftToRight: true + ) + .applySize(viewSize) + + // Then + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) + } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ChatChannelView_Tests/test_chatChannelView_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ChatChannelView_Tests/test_chatChannelView_snapshot.1.png index a4bc86250..3b5419021 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ChatChannelView_Tests/test_chatChannelView_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/ChatChannelView_Tests/test_chatChannelView_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_galleryView_snapshotLoading.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_galleryView_snapshotLoading.1.png index 9db0341e9..64ddb1852 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_galleryView_snapshotLoading.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_galleryView_snapshotLoading.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_gridViewVideoAndImage_snapshotLoading.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_gridViewVideoAndImage_snapshotLoading.1.png new file mode 100644 index 000000000..7259fce5d Binary files /dev/null and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_gridViewVideoAndImage_snapshotLoading.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_gridView_snapshotLoading.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_gridView_snapshotLoading.1.png index 46bff164f..8dbe96c3d 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_gridView_snapshotLoading.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/GalleryView_Tests/test_gridView_snapshotLoading.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failedWhenMessageTextIsEmpty_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failedWhenMessageTextIsEmpty_snapshot.1.png index c95b1bdc1..d1378f630 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failedWhenMessageTextIsEmpty_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failedWhenMessageTextIsEmpty_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failed_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failed_snapshot.1.png index bba5bc30d..c4c40bc8e 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failed_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_failed_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshot.1.png index 0be338997..5dda228e5 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshotFiveImages.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshotFiveImages.1.png index 946c91563..3eb49a394 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshotFiveImages.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_imageAttachments_snapshotFiveImages.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerEdited_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerEdited_snapshot.1.png index 8abb16638..417c9a44e 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerEdited_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerEdited_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewPinned_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewPinned_snapshot.1.png index 041176aad..351a6d97c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewPinned_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewPinned_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentOtherUser_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentOtherUser_snapshot.1.png index 9bc1ede9a..04af7f33c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentOtherUser_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentOtherUser_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentThisUser_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentThisUser_snapshot.1.png index a2aa7b0dc..f5218aedb 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentThisUser_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerViewSentThisUser_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_editingFailed_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_editingFailed_snapshot.1.png index 0ed7c0c69..a53286da7 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_editingFailed_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_editingFailed_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_sendingFailed_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_sendingFailed_snapshot.1.png index 0ed7c0c69..a53286da7 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_sendingFailed_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_messageContainerView_sendingFailed_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.default-light.png index 2b9d3110a..4ce42db04 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.extraExtraExtraLarge-light.png index 378e2233d..dd20c1a9b 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.rightToLeftLayout-default.png index 8e214530a..fa7b9444c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.small-dark.png index da635ee5f..687d750ad 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_myMessageIsNotTranslated_snapshot.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_participant_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_participant_snapshot.1.png index c16e211b9..623cccba7 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_participant_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_translatedText_participant_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotNoText.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotNoText.1.png index 3185cb776..f9d9b41ba 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotNoText.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotNoText.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotText.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotText.1.png index 82406ca35..12aa540a7 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotText.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageContainerView_Tests/test_videoAttachment_snapshotText.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_linkAttachmentView_shouldNotRenderLinkPreviewWithOtherAttachments.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_linkAttachmentView_shouldNotRenderLinkPreviewWithOtherAttachments.1.png index 2add2c1fb..ce9a533ba 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_linkAttachmentView_shouldNotRenderLinkPreviewWithOtherAttachments.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_linkAttachmentView_shouldNotRenderLinkPreviewWithOtherAttachments.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.default-light.png index c7e3e5b96..2db0be1c7 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.extraExtraExtraLarge-light.png index 111f228c8..4269fa8e0 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.rightToLeftLayout-default.png index 58ce6339f..f8c1e907c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.small-dark.png index d8fcb25af..0c4028e62 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_headers.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.default-light.png index f59c4503e..8c25a0457 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.extraExtraExtraLarge-light.png index 9828b6ed9..2e845dc33 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.rightToLeftLayout-default.png index 3c0595e11..446e1a86c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.small-dark.png index 63150f7fc..dc341f0f2 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_links_inLists.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.default-light.png index 667588518..0d3453a4b 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.extraExtraExtraLarge-light.png index 3b709b1bb..648d78975 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.rightToLeftLayout-default.png index a6e1ad7c9..8bce259ea 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.small-dark.png index b34d1fe3b..b499c0d53 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_orderedLists.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.default-light.png index 19f7ebc24..29f355352 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.extraExtraExtraLarge-light.png index 15ed99e5b..284af0d2c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.rightToLeftLayout-default.png index 627859192..bb0734172 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.small-dark.png index cb12c44c7..b01471c01 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.default-light.png index b3ed7e4df..99ec419dc 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.extraExtraExtraLarge-light.png index ac2ed93d3..981e4ded1 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.rightToLeftLayout-default.png index 239b77502..eceda719f 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.small-dark.png index 0efdcc9b0..423b8d336 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_multipleLines.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.default-light.png index 77837d03b..827a162e5 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.extraExtraExtraLarge-light.png index 1d692cf3f..38285e987 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.rightToLeftLayout-default.png index cbfd2a45e..8fc94b53b 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.small-dark.png index 3a23a3568..807ed4a4d 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_quote_separate.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.default-light.png index 56c4dfafc..4cc4f88f9 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.extraExtraExtraLarge-light.png index 35f6779d9..63f56fa8c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.rightToLeftLayout-default.png index cbc9dec8d..40b7adfef 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.small-dark.png index ce0cbebba..f37df4205 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_text.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.default-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.default-light.png index 4e23d8153..e8aa94d25 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.default-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.default-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.extraExtraExtraLarge-light.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.extraExtraExtraLarge-light.png index 19b24f024..1008ad51b 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.extraExtraExtraLarge-light.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.extraExtraExtraLarge-light.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.rightToLeftLayout-default.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.rightToLeftLayout-default.png index f2c8abcbd..83c8d0a16 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.rightToLeftLayout-default.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.rightToLeftLayout-default.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.small-dark.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.small-dark.png index 6ce672715..c935c91a5 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.small-dark.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_markdown_unorderedLists.small-dark.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewGiphy_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewGiphy_snapshot.1.png index 5ccc30e8d..56471e36d 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewGiphy_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewGiphy_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot.1.png index e3e68c156..720175997 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot2Images.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot2Images.1.png index cc906f46c..e2fde352c 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot2Images.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot2Images.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3Images.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3Images.1.png index f9aeb6634..c1771006f 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3Images.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3Images.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3ImagesAndVideo.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3ImagesAndVideo.1.png index c417582d4..6b459cc1f 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3ImagesAndVideo.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshot3ImagesAndVideo.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshotQuoted.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshotQuoted.1.png index daf9dd941..a5eda6fe9 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshotQuoted.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewImage_snapshotQuoted.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewVideo_snapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewVideo_snapshot.1.png index a9d183b24..12a5a7c75 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewVideo_snapshot.1.png and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/MessageView_Tests/test_messageViewVideo_snapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/QuotedMessageView_Tests/test_quotedMessageView_voiceAttachmentWithTextSnapshot.1.png b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/QuotedMessageView_Tests/test_quotedMessageView_voiceAttachmentWithTextSnapshot.1.png new file mode 100644 index 000000000..84a833d62 Binary files /dev/null and b/StreamChatSwiftUITests/Tests/ChatChannel/__Snapshots__/QuotedMessageView_Tests/test_quotedMessageView_voiceAttachmentWithTextSnapshot.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/ChannelHeaderLoader_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/ChannelHeaderLoader_Tests.swift index 0562c9498..ea80bd22d 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/ChannelHeaderLoader_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/ChannelHeaderLoader_Tests.swift @@ -11,13 +11,6 @@ class ChannelHeaderLoader_Tests: StreamChatTestCase { private let testURL = URL(string: "https://example.com")! - override func setUp() { - super.setUp() - let imageLoader = ImageLoader_Mock() - let utils = Utils(imageLoader: imageLoader) - streamChat = StreamChat(chatClient: chatClient, utils: utils) - } - func test_channelHeaderLoader_channelImageURL() { // Given let channel = ChatChannel.mockDMChannel(imageURL: testURL) diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift index ba4d87151..2ecd33df6 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift @@ -356,7 +356,11 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase { func test_channelListItem_draftMessageWithAttachment() throws { // Given let message = DraftMessage.mock(text: "Draft message", attachments: [.dummy(payload: try JSONEncoder().encode( - ImageAttachmentPayload(title: "Test", imageRemoteURL: .localYodaImage, file: .init(url: .localYodaImage)) + ImageAttachmentPayload( + title: "Test", + imageRemoteURL: .localYodaImage, + file: .init(url: .localYodaQuote) + ) ))]) let channel = ChatChannel.mock(cid: .unique, previewMessage: .mock(), draftMessage: message) diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift index 788b2ff60..9c0949f24 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift @@ -49,7 +49,7 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_searchResultsView_snapshotResults_whenChannelSearch() { @@ -95,7 +95,7 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_searchResultsView_snapshotNoResults() { @@ -117,7 +117,7 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_searchResultsView_snapshotLoading() { @@ -139,7 +139,7 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_searchResultsView_channelAvatarUpdated() { @@ -172,6 +172,6 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/__Snapshots__/SearchResultsView_Tests/test_searchResultsView_snapshotLoading.1.png b/StreamChatSwiftUITests/Tests/ChatChannelList/__Snapshots__/SearchResultsView_Tests/test_searchResultsView_snapshotLoading.1.png index d5a0c6317..ae8f83d74 100644 Binary files a/StreamChatSwiftUITests/Tests/ChatChannelList/__Snapshots__/SearchResultsView_Tests/test_searchResultsView_snapshotLoading.1.png and b/StreamChatSwiftUITests/Tests/ChatChannelList/__Snapshots__/SearchResultsView_Tests/test_searchResultsView_snapshotLoading.1.png differ diff --git a/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListItemView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListItemView_Tests.swift index 19dd5a405..ad54cfea4 100644 --- a/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListItemView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatThreadList/ChatThreadListItemView_Tests.swift @@ -144,7 +144,11 @@ final class ChatThreadListItemView_Tests: StreamChatTestCase { func test_threadListItem_whenDraftMessageHasAttachment() throws { let message = DraftMessage.mock(text: "Draft message", attachments: [.dummy(payload: try JSONEncoder().encode( - ImageAttachmentPayload(title: "Test", imageRemoteURL: .localYodaImage, file: .init(url: .localYodaImage)) + ImageAttachmentPayload( + title: "Test", + imageRemoteURL: .localYodaImage, + file: .init(url: ChatChannelTestHelpers.testFileURL) + ) ))]) let thread = mockThread .with(parentMessage: .mock( diff --git a/StreamChatSwiftUITests/Tests/CommonViews/AlertBannerViewModifier_Tests.swift b/StreamChatSwiftUITests/Tests/CommonViews/AlertBannerViewModifier_Tests.swift index ce0eed131..af14a6ffd 100644 --- a/StreamChatSwiftUITests/Tests/CommonViews/AlertBannerViewModifier_Tests.swift +++ b/StreamChatSwiftUITests/Tests/CommonViews/AlertBannerViewModifier_Tests.swift @@ -16,6 +16,6 @@ final class AlertBannerViewModifier_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width) // Then - assertSnapshot(matching: view, as: .image) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } } diff --git a/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift b/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift index 6fe62a3a3..e28d648e1 100644 --- a/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift +++ b/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift @@ -22,7 +22,10 @@ open class StreamChatTestCase: XCTestCase { override open func setUp() { super.setUp() - streamChat = StreamChat(chatClient: chatClient) + streamChat = StreamChat( + chatClient: chatClient, + utils: Utils(videoPreviewLoader: VideoPreviewLoader_Mock(), imageLoader: ImageLoader_Mock()) + ) } func adjustAppearance(_ block: (inout Appearance) -> Void) { diff --git a/StreamChatSwiftUITests/Tests/Utils/StreamChat_Utils_Tests.swift b/StreamChatSwiftUITests/Tests/Utils/StreamChat_Utils_Tests.swift index aca39c4ee..5572051ca 100644 --- a/StreamChatSwiftUITests/Tests/Utils/StreamChat_Utils_Tests.swift +++ b/StreamChatSwiftUITests/Tests/Utils/StreamChat_Utils_Tests.swift @@ -15,7 +15,7 @@ class StreamChat_Utils_Tests: StreamChatTestCase { override func setUp() { let utils = Utils( videoPreviewLoader: VideoPreviewLoader_Mock(), - imageLoader: ImageLoaderUtils_Mock() + imageLoader: ImageLoader_Mock() ) streamChat = StreamChat(chatClient: chatClient, utils: utils) } @@ -33,7 +33,7 @@ class StreamChat_Utils_Tests: StreamChatTestCase { func test_streamChatUtils_injectImageLoader() { // Given - let imageLoader = utils.imageLoader as! ImageLoaderUtils_Mock + let imageLoader = utils.imageLoader as! ImageLoader_Mock // When imageLoader.loadImage( diff --git a/fastlane/Fastfile b/fastlane/Fastfile index dd1a3d898..9075886a9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -8,7 +8,7 @@ require 'xcodeproj' import 'Sonarfile' import 'Allurefile' -xcode_version = ENV['XCODE_VERSION'] || '16.3' +xcode_version = ENV['XCODE_VERSION'] || '16.4' xcode_project = 'StreamChatSwiftUI.xcodeproj' sdk_names = ['StreamChatSwiftUI'] github_repo = ENV['GITHUB_REPOSITORY'] || 'GetStream/stream-chat-swiftui'