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)