From 1046372aa11658e4f5d22b755d3fd4876d0c01c2 Mon Sep 17 00:00:00 2001 From: Alexey Alter-Pesotskiy Date: Thu, 26 Oct 2023 09:28:10 +0100 Subject: [PATCH] Bump test helpers version --- StreamChatSwiftUI.xcodeproj/project.pbxproj | 2 +- .../ChatChannelListItemView_Tests.swift | 11 ++++++----- StreamChatSwiftUITests/Tests/StreamChatTestCase.swift | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/StreamChatSwiftUI.xcodeproj/project.pbxproj b/StreamChatSwiftUI.xcodeproj/project.pbxproj index 1375865c..12420e4d 100644 --- a/StreamChatSwiftUI.xcodeproj/project.pbxproj +++ b/StreamChatSwiftUI.xcodeproj/project.pbxproj @@ -3229,7 +3229,7 @@ repositoryURL = "https://github.com/GetStream/stream-chat-swift-test-helpers.git"; requirement = { kind = exactVersion; - version = 0.3.0; + version = 0.3.1; }; }; 8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */ = { diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift index ca785665..976a3caa 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListItemView_Tests.swift @@ -6,6 +6,7 @@ import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI @testable import StreamChatTestTools +@testable import StreamSwiftTestHelpers import XCTest final class ChatChannelListItemView_Tests: StreamChatTestCase { @@ -26,7 +27,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_channelListItem_imageMessage() throws { @@ -45,7 +46,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_channelListItem_videoMessage() throws { @@ -64,7 +65,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_channelListItem_fileMessage() throws { @@ -83,7 +84,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } func test_channelListItem_giphyMessage() throws { @@ -102,7 +103,7 @@ final class ChatChannelListItemView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + assertSnapshot(matching: view, as: .image(perceptualPrecision: precision)) } // MARK: - private diff --git a/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift b/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift index 03c94bd8..793ba562 100644 --- a/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift +++ b/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift @@ -12,7 +12,6 @@ import XCTest open class StreamChatTestCase: XCTestCase { public static var currentUserId: String = .unique - public let snapshotPrecision: Float = 0.95 public var chatClient: ChatClient = { let client = ChatClient.mock(isLocalStorageEnabled: false)