From 7ee7468c497a84db4060f890eae3acef793b9f46 Mon Sep 17 00:00:00 2001 From: Alexey Alter-Pesotskiy Date: Thu, 5 Oct 2023 11:19:59 +0100 Subject: [PATCH] Update StreamSwiftTestHelpers --- StreamChatSwiftUI.xcodeproj/project.pbxproj | 152 +++++++++--------- .../ChannelInfo/AddUsersView_Tests.swift | 4 +- .../ChatChannelInfoView_Tests.swift | 18 +-- .../FileAttachmentsView_Tests.swift | 10 +- .../MediaAttachmentsView_Tests.swift | 8 +- .../PinnedMessagesView_Tests.swift | 6 +- .../ChatChannelDataSource_Tests.swift | 1 - .../ChatChannel/ChatChannelHeader_Tests.swift | 8 +- .../ChatChannelViewDateOverlay_Tests.swift | 4 +- .../ChatChannelViewModel_Tests.swift | 1 + .../ChatChannel/ChatChannelView_Tests.swift | 10 +- .../ChatMessageBubbles_Tests.swift | 1 + .../Tests/ChatChannel/GalleryView_Tests.swift | 8 +- .../LazyImageExtensions_Tests.swift | 8 +- .../MessageComposerView_Tests.swift | 24 +-- .../MessageContainerView_Tests.swift | 16 +- .../MessageListViewAvatars_Tests.swift | 10 +- ...MessageListViewLastGroupHeader_Tests.swift | 4 +- .../MessageListViewNewMessages_Tests.swift | 10 +- .../ChatChannel/MessageListView_Tests.swift | 14 +- .../MessageReadIndicatorView_Tests.swift | 10 +- .../MessageViewMultiRowReactions_Tests.swift | 4 +- .../Tests/ChatChannel/MessageView_Tests.swift | 32 ++-- .../ChatChannel/QuotedMessageView_Tests.swift | 6 +- .../ReactionsOverlayView_Tests.swift | 16 +- .../ReactionsUsersView_Tests.swift | 6 +- .../InstantCommandsView_Tests.swift | 10 +- .../TypingIndicatorView_Tests.swift | 4 +- .../Tests/ChatChannel/WebView_Tests.swift | 4 +- .../ChatChannelListView_Tests.swift | 10 +- .../ChatChannelList/LoadingView_Tests.swift | 6 +- ...lActionsFullScreenWrappingView_Tests.swift | 4 +- .../MoreChannelActionsView_Tests.swift | 4 +- .../NoChannelsView_Tests.swift | 4 +- .../SearchResultsView_Tests.swift | 8 +- .../Tests/StreamChatTestCase.swift | 3 +- .../StreamChatSwiftUITests.swift | 2 +- 37 files changed, 221 insertions(+), 229 deletions(-) diff --git a/StreamChatSwiftUI.xcodeproj/project.pbxproj b/StreamChatSwiftUI.xcodeproj/project.pbxproj index 626a9df18..bd84d4f9a 100644 --- a/StreamChatSwiftUI.xcodeproj/project.pbxproj +++ b/StreamChatSwiftUI.xcodeproj/project.pbxproj @@ -10,6 +10,12 @@ 820A61A029D6D78E002257FB /* QuotedReply_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 820A619F29D6D78E002257FB /* QuotedReply_Tests.swift */; }; 825AADF4283CCDB000237498 /* ThreadPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 825AADF3283CCDB000237498 /* ThreadPage.swift */; }; 827352FD290BE91100A87385 /* NotificationsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8492974827ABDDBF00A8EEB0 /* NotificationsHandler.swift */; }; + 827414302ACDED04009CD13C /* Swifter in Frameworks */ = {isa = PBXBuildFile; platformFilter = ios; productRef = 8274142F2ACDED04009CD13C /* Swifter */; }; + 827414332ACDED43009CD13C /* StreamChat in Frameworks */ = {isa = PBXBuildFile; productRef = 827414322ACDED43009CD13C /* StreamChat */; }; + 827414352ACDED43009CD13C /* StreamChatTestMockServer in Frameworks */ = {isa = PBXBuildFile; platformFilter = ios; productRef = 827414342ACDED43009CD13C /* StreamChatTestMockServer */; }; + 827414372ACDED43009CD13C /* StreamChatTestTools in Frameworks */ = {isa = PBXBuildFile; productRef = 827414362ACDED43009CD13C /* StreamChatTestTools */; }; + 8274143F2ACDF444009CD13C /* StreamSwiftTestHelpers in Frameworks */ = {isa = PBXBuildFile; platformFilter = ios; productRef = 8274143E2ACDF444009CD13C /* StreamSwiftTestHelpers */; }; + 827414452ACEBEBD009CD13C /* StreamSwiftTestHelpers in Frameworks */ = {isa = PBXBuildFile; productRef = 827414442ACEBEBD009CD13C /* StreamSwiftTestHelpers */; }; 829AB4D228578ACF002DC629 /* StreamTestCase+Tags.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829AB4D128578ACF002DC629 /* StreamTestCase+Tags.swift */; }; 829AB4D42858A532002DC629 /* Reactions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829AB4D32858A532002DC629 /* Reactions_Tests.swift */; }; 829CD5CE2848CA6B003C3877 /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829CD5CD2848CA6B003C3877 /* Settings.swift */; }; @@ -202,8 +208,6 @@ 846608E7278C95E700D3D7B3 /* ChatChannelExtensions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846608E6278C95E700D3D7B3 /* ChatChannelExtensions_Tests.swift */; }; 846608E9278C98CB00D3D7B3 /* TypingIndicatorView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846608E8278C98CB00D3D7B3 /* TypingIndicatorView_Tests.swift */; }; 8469592F29BB235400134EA0 /* LazyImageExtensions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8469592E29BB235400134EA0 /* LazyImageExtensions_Tests.swift */; }; - 846AD4D0284F89B10074A0DD /* StreamChatTestMockServer in Frameworks */ = {isa = PBXBuildFile; productRef = 846AD4CF284F89B10074A0DD /* StreamChatTestMockServer */; }; - 846AD4D2284F89B10074A0DD /* StreamChatTestTools in Frameworks */ = {isa = PBXBuildFile; productRef = 846AD4D1284F89B10074A0DD /* StreamChatTestTools */; }; 846AD4D4284F95710074A0DD /* CustomChannelHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846AD4D3284F95710074A0DD /* CustomChannelHeader.swift */; }; 846B15F42817E7630017F7A1 /* ChatChannelInfoViewModel_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846B15F32817E7630017F7A1 /* ChatChannelInfoViewModel_Tests.swift */; }; 846D6564279FF0800094B36E /* ReactionUserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846D6563279FF0800094B36E /* ReactionUserView.swift */; }; @@ -215,7 +219,6 @@ 84782785284A4DB500D2EE11 /* ChatClient_Mock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94CCB27578B92007FE2B9 /* ChatClient_Mock.swift */; }; 847CEFEE27C38ABE00606257 /* MessageCachingUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847CEFED27C38ABE00606257 /* MessageCachingUtils.swift */; }; 847F7949282A91AD0009F74C /* ChatChannelView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847F7948282A91AD0009F74C /* ChatChannelView_Tests.swift */; }; - 848399EA275FB3E9003075E4 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 848399E9275FB3E9003075E4 /* SnapshotTesting */; }; 848399EC275FB41B003075E4 /* ChatChannelListView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848399EB275FB41B003075E4 /* ChatChannelListView_Tests.swift */; }; 848399F227601231003075E4 /* ReactionsOverlayView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848399F127601231003075E4 /* ReactionsOverlayView_Tests.swift */; }; 8492974B27ABDDCB00A8EEB0 /* NotificationsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8492974827ABDDBF00A8EEB0 /* NotificationsHandler.swift */; }; @@ -250,7 +253,6 @@ 84B2B5DA281985DA00479CEE /* FileAttachmentsView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B2B5D9281985DA00479CEE /* FileAttachmentsView_Tests.swift */; }; 84B439E127C6B2F100C04C99 /* MessageCachingUtils_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B439E027C6B2F100C04C99 /* MessageCachingUtils_Tests.swift */; }; 84B55F6A2798154C00B99B01 /* MessageListConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B55F692798154C00B99B01 /* MessageListConfig.swift */; }; - 84B87F232861C0C900959CBE /* StreamChat in Frameworks */ = {isa = PBXBuildFile; productRef = 84B87F222861C0C900959CBE /* StreamChat */; }; 84B9B20E27998E9200BFAEAE /* ColorExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B9B20D27998E9200BFAEAE /* ColorExtensions.swift */; }; 84BB4C4C2841104700CBE004 /* MessageListDateUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BB4C4B2841104700CBE004 /* MessageListDateUtils.swift */; }; 84BB4C4E284115C200CBE004 /* MessageListDateUtils_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BB4C4D284115C200CBE004 /* MessageListDateUtils_Tests.swift */; }; @@ -327,8 +329,6 @@ 84E6EC23279AEE6B0017207B /* MessageContainerView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E6EC22279AEE6B0017207B /* MessageContainerView_Tests.swift */; }; 84E6EC25279AEE9F0017207B /* StreamChatTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E6EC24279AEE9F0017207B /* StreamChatTestCase.swift */; }; 84E6EC27279B0C930017207B /* ReactionsUsersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E6EC26279B0C930017207B /* ReactionsUsersView.swift */; }; - 84E95A77284A486600699FD3 /* StreamChat in Frameworks */ = {isa = PBXBuildFile; productRef = 84E95A76284A486600699FD3 /* StreamChat */; }; - 84E95A7D284A491000699FD3 /* StreamChatTestTools in Frameworks */ = {isa = PBXBuildFile; productRef = 84E95A7C284A491000699FD3 /* StreamChatTestTools */; }; 84EDBC37274FE5CD0057218D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84EDBC36274FE5CD0057218D /* Localizable.strings */; }; 84F2908A276B90610045472D /* GalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F29089276B90610045472D /* GalleryView.swift */; }; 84F2908C276B91700045472D /* ZoomableScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F2908B276B91700045472D /* ZoomableScrollView.swift */; }; @@ -342,7 +342,6 @@ 91B79FD9284E7E9C005B6E4F /* ChatUserNamer_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91B79FD8284E7E9C005B6E4F /* ChatUserNamer_Tests.swift */; }; 91CC203A283C3E7F0049A146 /* URLExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91CC2039283C3E7F0049A146 /* URLExtensions.swift */; }; 91CC203C283C4C250049A146 /* URLUtils_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91CC203B283C4C250049A146 /* URLUtils_Tests.swift */; }; - A3571603283E9D9F0014E3B0 /* Swifter in Frameworks */ = {isa = PBXBuildFile; productRef = A3571602283E9D9F0014E3B0 /* Swifter */; }; A35D803B283E89F50084FE25 /* StreamChatSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8465FBB52746873A00AF091E /* StreamChatSwiftUI.framework */; }; A35D803C283E89F50084FE25 /* StreamChatSwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8465FBB52746873A00AF091E /* StreamChatSwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A3600B2A283E9E1900E1C930 /* UserRobot.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3600B24283E9E1900E1C930 /* UserRobot.swift */; }; @@ -775,9 +774,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A3571603283E9D9F0014E3B0 /* Swifter in Frameworks */, - 846AD4D2284F89B10074A0DD /* StreamChatTestTools in Frameworks */, - 846AD4D0284F89B10074A0DD /* StreamChatTestMockServer in Frameworks */, + 827414302ACDED04009CD13C /* Swifter in Frameworks */, + 8274143F2ACDF444009CD13C /* StreamSwiftTestHelpers in Frameworks */, + 827414352ACDED43009CD13C /* StreamChatTestMockServer in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -794,8 +793,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 827414332ACDED43009CD13C /* StreamChat in Frameworks */, 842ADEA628EADC6600F2BE36 /* NukeUI in Frameworks */, - 84E95A77284A486600699FD3 /* StreamChat in Frameworks */, 842ADEA428EADC6600F2BE36 /* Nuke in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -804,9 +803,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 827414372ACDED43009CD13C /* StreamChatTestTools in Frameworks */, + 827414452ACEBEBD009CD13C /* StreamSwiftTestHelpers in Frameworks */, 8465FBBE2746873A00AF091E /* StreamChatSwiftUI.framework in Frameworks */, - 84E95A7D284A491000699FD3 /* StreamChatTestTools in Frameworks */, - 848399EA275FB3E9003075E4 /* SnapshotTesting in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -814,7 +813,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 84B87F232861C0C900959CBE /* StreamChat in Frameworks */, 8465FCE6274695B400AF091E /* StreamChatSwiftUI.framework in Frameworks */, E3A1C01C282BAC66002D1E26 /* Sentry in Frameworks */, ); @@ -1589,9 +1587,9 @@ ); name = StreamChatSwiftUITestsAppTests; packageProductDependencies = ( - A3571602283E9D9F0014E3B0 /* Swifter */, - 846AD4CF284F89B10074A0DD /* StreamChatTestMockServer */, - 846AD4D1284F89B10074A0DD /* StreamChatTestTools */, + 8274142F2ACDED04009CD13C /* Swifter */, + 827414342ACDED43009CD13C /* StreamChatTestMockServer */, + 8274143E2ACDF444009CD13C /* StreamSwiftTestHelpers */, ); productName = StreamChatSwiftUITestsAppTests; productReference = 8400A351282E6BE30067D3A0 /* StreamChatSwiftUITestsAppTests.xctest */; @@ -1636,9 +1634,9 @@ ); name = StreamChatSwiftUI; packageProductDependencies = ( - 84E95A76284A486600699FD3 /* StreamChat */, 842ADEA328EADC6600F2BE36 /* Nuke */, 842ADEA528EADC6600F2BE36 /* NukeUI */, + 827414322ACDED43009CD13C /* StreamChat */, ); productName = StreamChatSwiftUI; productReference = 8465FBB52746873A00AF091E /* StreamChatSwiftUI.framework */; @@ -1659,8 +1657,8 @@ ); name = StreamChatSwiftUITests; packageProductDependencies = ( - 848399E9275FB3E9003075E4 /* SnapshotTesting */, - 84E95A7C284A491000699FD3 /* StreamChatTestTools */, + 827414362ACDED43009CD13C /* StreamChatTestTools */, + 827414442ACEBEBD009CD13C /* StreamSwiftTestHelpers */, ); productName = StreamChatSwiftUITests; productReference = 8465FBBD2746873A00AF091E /* StreamChatSwiftUITests.xctest */; @@ -1683,7 +1681,6 @@ name = DemoAppSwiftUI; packageProductDependencies = ( E3A1C01B282BAC66002D1E26 /* Sentry */, - 84B87F222861C0C900959CBE /* StreamChat */, ); productName = DemoAppSwiftUI; productReference = 8465FCBC27468B6900AF091E /* DemoAppSwiftUI.app */; @@ -1729,12 +1726,12 @@ ); mainGroup = 8465FBAB2746873A00AF091E; packageReferences = ( - 848399E6275FB3BE003075E4 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */, E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */, 8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */, - A3571601283E9D9F0014E3B0 /* XCRemoteSwiftPackageReference "swifter" */, - 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */, 842ADEA228EADC6600F2BE36 /* XCRemoteSwiftPackageReference "Nuke" */, + 8274142E2ACDED04009CD13C /* XCRemoteSwiftPackageReference "swifter" */, + 827414312ACDED43009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift" */, + 8274143D2ACDF430009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */, ); productRefGroup = 8465FBB62746873A00AF091E /* Products */; projectDirPath = ""; @@ -2700,52 +2697,52 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */ = { + 8274142E2ACDED04009CD13C /* XCRemoteSwiftPackageReference "swifter" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/AliSoftware/OHHTTPStubs.git"; + repositoryURL = "https://github.com/httpswift/swifter"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 9.0.0; + kind = revision; + revision = 1e4f51c92d7ca486242d8bf0722b99de2c3531aa; }; }; - 842ADEA228EADC6600F2BE36 /* XCRemoteSwiftPackageReference "Nuke" */ = { + 827414312ACDED43009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/kean/Nuke.git"; + repositoryURL = "https://github.com/GetStream/stream-chat-swift.git"; requirement = { - kind = exactVersion; - version = 11.3.1; + branch = ci/spm; + kind = branch; }; }; - 8465FCB227468A8D00AF091E /* XCRemoteSwiftPackageReference "stream-chat-swift" */ = { + 8274143D2ACDF430009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/GetStream/stream-chat-swift.git"; + repositoryURL = "https://github.com/GetStream/stream-chat-swift-test-helpers.git"; requirement = { kind = exactVersion; - version = 4.10.1; + version = 0.3.0; }; }; - 848399E6275FB3BE003075E4 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { + 8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing.git"; + repositoryURL = "https://github.com/AliSoftware/OHHTTPStubs.git"; requirement = { - kind = exactVersion; - version = 1.11.0; + kind = upToNextMajorVersion; + minimumVersion = 9.0.0; }; }; - 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */ = { + 842ADEA228EADC6600F2BE36 /* XCRemoteSwiftPackageReference "Nuke" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/GetStream/stream-chat-swift.git"; + repositoryURL = "https://github.com/kean/Nuke.git"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 4.38.0; + kind = exactVersion; + version = 11.3.1; }; }; - A3571601283E9D9F0014E3B0 /* XCRemoteSwiftPackageReference "swifter" */ = { + 8465FCB227468A8D00AF091E /* XCRemoteSwiftPackageReference "stream-chat-swift" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/httpswift/swifter.git"; + repositoryURL = "https://github.com/GetStream/stream-chat-swift.git"; requirement = { kind = exactVersion; - version = 1.5.0; + version = 4.10.1; }; }; E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { @@ -2759,60 +2756,55 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 8400A34B282C081E0067D3A0 /* OHHTTPStubs */ = { - isa = XCSwiftPackageProductDependency; - package = 8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */; - productName = OHHTTPStubs; - }; - 842ADEA328EADC6600F2BE36 /* Nuke */ = { - isa = XCSwiftPackageProductDependency; - package = 842ADEA228EADC6600F2BE36 /* XCRemoteSwiftPackageReference "Nuke" */; - productName = Nuke; - }; - 842ADEA528EADC6600F2BE36 /* NukeUI */ = { + 8274142F2ACDED04009CD13C /* Swifter */ = { isa = XCSwiftPackageProductDependency; - package = 842ADEA228EADC6600F2BE36 /* XCRemoteSwiftPackageReference "Nuke" */; - productName = NukeUI; + package = 8274142E2ACDED04009CD13C /* XCRemoteSwiftPackageReference "swifter" */; + productName = Swifter; }; - 8465FCE32746954F00AF091E /* StreamChat */ = { + 827414322ACDED43009CD13C /* StreamChat */ = { isa = XCSwiftPackageProductDependency; - package = 8465FCB227468A8D00AF091E /* XCRemoteSwiftPackageReference "stream-chat-swift" */; + package = 827414312ACDED43009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift" */; productName = StreamChat; }; - 846AD4CF284F89B10074A0DD /* StreamChatTestMockServer */ = { + 827414342ACDED43009CD13C /* StreamChatTestMockServer */ = { isa = XCSwiftPackageProductDependency; - package = 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */; + package = 827414312ACDED43009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift" */; productName = StreamChatTestMockServer; }; - 846AD4D1284F89B10074A0DD /* StreamChatTestTools */ = { + 827414362ACDED43009CD13C /* StreamChatTestTools */ = { isa = XCSwiftPackageProductDependency; - package = 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */; + package = 827414312ACDED43009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift" */; productName = StreamChatTestTools; }; - 848399E9275FB3E9003075E4 /* SnapshotTesting */ = { + 8274143E2ACDF444009CD13C /* StreamSwiftTestHelpers */ = { isa = XCSwiftPackageProductDependency; - package = 848399E6275FB3BE003075E4 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; - productName = SnapshotTesting; + package = 8274143D2ACDF430009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */; + productName = StreamSwiftTestHelpers; }; - 84B87F222861C0C900959CBE /* StreamChat */ = { + 827414442ACEBEBD009CD13C /* StreamSwiftTestHelpers */ = { isa = XCSwiftPackageProductDependency; - package = 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */; - productName = StreamChat; + package = 8274143D2ACDF430009CD13C /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */; + productName = StreamSwiftTestHelpers; }; - 84E95A76284A486600699FD3 /* StreamChat */ = { + 8400A34B282C081E0067D3A0 /* OHHTTPStubs */ = { isa = XCSwiftPackageProductDependency; - package = 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */; - productName = StreamChat; + package = 8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */; + productName = OHHTTPStubs; }; - 84E95A7C284A491000699FD3 /* StreamChatTestTools */ = { + 842ADEA328EADC6600F2BE36 /* Nuke */ = { isa = XCSwiftPackageProductDependency; - package = 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */; - productName = StreamChatTestTools; + package = 842ADEA228EADC6600F2BE36 /* XCRemoteSwiftPackageReference "Nuke" */; + productName = Nuke; }; - A3571602283E9D9F0014E3B0 /* Swifter */ = { + 842ADEA528EADC6600F2BE36 /* NukeUI */ = { isa = XCSwiftPackageProductDependency; - package = A3571601283E9D9F0014E3B0 /* XCRemoteSwiftPackageReference "swifter" */; - productName = Swifter; + package = 842ADEA228EADC6600F2BE36 /* XCRemoteSwiftPackageReference "Nuke" */; + productName = NukeUI; + }; + 8465FCE32746954F00AF091E /* StreamChat */ = { + isa = XCSwiftPackageProductDependency; + package = 8465FCB227468A8D00AF091E /* XCRemoteSwiftPackageReference "stream-chat-swift" */; + productName = StreamChat; }; E3A1C01B282BAC66002D1E26 /* Sentry */ = { isa = XCSwiftPackageProductDependency; diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/AddUsersView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/AddUsersView_Tests.swift index 5412218ea..b8842412d 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/AddUsersView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/AddUsersView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -25,6 +25,6 @@ class AddUsersView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/ChatChannelInfoView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/ChatChannelInfoView_Tests.swift index 725e63661..dddc55c32 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/ChatChannelInfoView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/ChatChannelInfoView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -26,7 +26,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelInfoView_directChannelOnlineSnapshot() { @@ -46,7 +46,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelInfoView_directChannelMutedSnapshot() { @@ -66,7 +66,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelInfoView_groupCollapsedSnapshot() { @@ -89,7 +89,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelInfoView_smallGroupSnapshot() { @@ -112,7 +112,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelInfoView_groupExpandedSnapshot() { @@ -137,7 +137,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelInfoView_navBarSnapshot() { @@ -166,7 +166,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: navigationView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(navigationView) } func test_chatChannelInfoView_addUsersShownSnapshot() { @@ -191,6 +191,6 @@ class ChatChannelInfoView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/FileAttachmentsView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/FileAttachmentsView_Tests.swift index 9ceb44723..19e7c301e 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/FileAttachmentsView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/FileAttachmentsView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -25,7 +25,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_fileAttachmentsView_emptySnapshot() { @@ -40,7 +40,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_fileAttachmentsView_loadingSnapshot() { @@ -55,7 +55,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_fileAttachmentsPickerView_snapshot() { @@ -64,6 +64,6 @@ class FileAttachmentsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsView_Tests.swift index 2ed3173aa..8100b5b73 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -28,7 +28,7 @@ class MediaAttachmentsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_mediaAttachmentsView_emptySnapshot() { @@ -41,7 +41,7 @@ class MediaAttachmentsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_mediaAttachmentsView_loading() { @@ -54,6 +54,6 @@ class MediaAttachmentsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift index 2c71dac90..3ef5da690 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -27,7 +27,7 @@ class PinnedMessagesView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_pinnedMessagesView_emptySnapshot() { @@ -39,7 +39,7 @@ class PinnedMessagesView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelDataSource_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelDataSource_Tests.swift index f2a000753..ea2d781ff 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelDataSource_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelDataSource_Tests.swift @@ -2,7 +2,6 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI import SwiftUI diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelHeader_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelHeader_Tests.swift index 1caf1e747..5d3c378a8 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelHeader_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelHeader_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -23,7 +23,7 @@ class ChatChannelHeader_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelHeader_snapshot() { @@ -41,7 +41,7 @@ class ChatChannelHeader_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_channelTitleView_snapshot() { @@ -53,6 +53,6 @@ class ChatChannelHeader_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewDateOverlay_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewDateOverlay_Tests.swift index d4004923e..a12710a45 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewDateOverlay_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewDateOverlay_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -62,6 +62,6 @@ class ChatChannelViewDateOverlay_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewModel_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewModel_Tests.swift index cb9053353..dcc7c5d34 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewModel_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewModel_Tests.swift @@ -4,6 +4,7 @@ @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift index 1314f7259..44f4783aa 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -51,7 +51,7 @@ class ChatChannelView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelView_snapshotEmpty() { @@ -82,7 +82,7 @@ class ChatChannelView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelView_snapshotLoading() { @@ -107,7 +107,7 @@ class ChatChannelView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_defaultChannelHeader_snapshot() { @@ -126,6 +126,6 @@ class ChatChannelView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ChatMessageBubbles_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ChatMessageBubbles_Tests.swift index d8de17d64..0dad3c8a8 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ChatMessageBubbles_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ChatMessageBubbles_Tests.swift @@ -4,6 +4,7 @@ @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift index ea9337302..46a133fde 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/GalleryView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -30,7 +30,7 @@ class GalleryView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_galleryHeader_snapshot() { @@ -43,7 +43,7 @@ class GalleryView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width, height: 44) // Then - assertSnapshot(matching: header, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(header) } func test_gridView_snapshotLoading() { @@ -55,6 +55,6 @@ class GalleryView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift index f3a770fdb..3acdc87d0 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/LazyImageExtensions_Tests.swift @@ -3,9 +3,9 @@ // import NukeUI -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -18,7 +18,7 @@ final class LazyImageExtensions_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: lazyImageView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(lazyImageView) } func test_imageURL_nonEmpty() { @@ -29,7 +29,7 @@ final class LazyImageExtensions_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: lazyImageView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(lazyImageView) } func test_imageRequest_emptyURL() { @@ -40,6 +40,6 @@ final class LazyImageExtensions_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: lazyImageView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(lazyImageView) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageComposerView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageComposerView_Tests.swift index b692f4c6d..c5153b279 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageComposerView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageComposerView_Tests.swift @@ -3,9 +3,9 @@ // import Photos -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -36,7 +36,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width, height: 100) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_composerInputView_slowMode() { @@ -60,7 +60,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width, height: 100) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_trailingComposerView_snapshot() { @@ -76,7 +76,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .frame(width: 40, height: 40) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_trailingComposerView_slowMode() { @@ -92,7 +92,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .frame(width: 40, height: 40) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_composerInputView_inputTextView() { @@ -106,7 +106,7 @@ class MessageComposerView_Tests: StreamChatTestCase { view.selectedRange.location = 3 // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_composerInputView_composerInputTextView() { @@ -122,7 +122,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width, height: 50) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_composerInputView_rangeSelection() { @@ -187,7 +187,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width, height: 36) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_composerInputView_snapshot() { @@ -210,7 +210,7 @@ class MessageComposerView_Tests: StreamChatTestCase { coordinator.updateHeight(inputView, shouldAnimate: false) // Then - assertSnapshot(matching: viewWithSize, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(viewWithSize) XCTAssert(coordinator.textInput.height == 100) } @@ -243,7 +243,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .background(.black) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_videoDurationIndicatorView_snapshot() { @@ -253,7 +253,7 @@ class MessageComposerView_Tests: StreamChatTestCase { .background(.black) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_photosPickerView_snapshot() { @@ -266,6 +266,6 @@ class MessageComposerView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift index 5674da411..afe995d34 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageContainerView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -30,7 +30,7 @@ class MessageContainerView_Tests: StreamChatTestCase { let view = testMessageViewContainer(message: message) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageContainerViewSentOtherUser_snapshot() { @@ -46,7 +46,7 @@ class MessageContainerView_Tests: StreamChatTestCase { let view = testMessageViewContainer(message: message) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageContainerViewPinned_snapshot() { @@ -67,7 +67,7 @@ class MessageContainerView_Tests: StreamChatTestCase { let view = testMessageViewContainer(message: message) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_videoAttachment_snapshotNoText() { @@ -89,7 +89,7 @@ class MessageContainerView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_videoAttachment_snapshotText() { @@ -113,7 +113,7 @@ class MessageContainerView_Tests: StreamChatTestCase { .padding() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_imageAttachments_snapshot() { @@ -137,7 +137,7 @@ class MessageContainerView_Tests: StreamChatTestCase { .frame(width: 200) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_imageAttachments_snapshotFiveImages() { @@ -163,7 +163,7 @@ class MessageContainerView_Tests: StreamChatTestCase { .frame(width: 200) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } // MARK: - private diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewAvatars_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewAvatars_Tests.swift index 88ecd295a..34a9dd1eb 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewAvatars_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewAvatars_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class MessageListViewAvatars_Tests: StreamChatTestCase { @@ -18,7 +18,7 @@ class MessageListViewAvatars_Tests: StreamChatTestCase { let view = makeMessageListView(with: channel).applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageListView_defaultGroupsChannel() { @@ -30,7 +30,7 @@ class MessageListViewAvatars_Tests: StreamChatTestCase { let view = makeMessageListView(with: channel).applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageListView_dmChannelAvatarsOff() { @@ -42,7 +42,7 @@ class MessageListViewAvatars_Tests: StreamChatTestCase { let view = makeMessageListView(with: channel).applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageListView_groupsChannelAvatarsOff() { @@ -54,7 +54,7 @@ class MessageListViewAvatars_Tests: StreamChatTestCase { let view = makeMessageListView(with: channel).applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } private func setupConfig(showAvatars: Bool, showAvatarsInGroups: Bool?) { diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewLastGroupHeader_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewLastGroupHeader_Tests.swift index f61aec81f..a0ec63bc2 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewLastGroupHeader_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewLastGroupHeader_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -58,7 +58,7 @@ class MessageListViewLastGroupHeader_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewNewMessages_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewNewMessages_Tests.swift index 3687479b4..81a0d0d4c 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewNewMessages_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListViewNewMessages_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -30,7 +30,7 @@ final class MessageListViewNewMessages_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: messageListView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(messageListView) } func test_messageListViewNewMessages_moreMessages() { @@ -48,7 +48,7 @@ final class MessageListViewNewMessages_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: messageListView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(messageListView) } func test_messageListViewNewMessages_moreMessagesInBetween() { @@ -66,7 +66,7 @@ final class MessageListViewNewMessages_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: messageListView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(messageListView) } func test_messageListViewNewMessages_noMessages() { @@ -84,7 +84,7 @@ final class MessageListViewNewMessages_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: messageListView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(messageListView) } // MARK: - private diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListView_Tests.swift index 50eac8d25..3ea66e09e 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageListView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageListView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -17,7 +17,7 @@ class MessageListView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: messageListView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(messageListView) } func test_messageListView_noReactions() { @@ -27,7 +27,7 @@ class MessageListView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: messageListView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(messageListView) } func test_scrollToBottomButton_snapshotUnreadCount() { @@ -35,7 +35,7 @@ class MessageListView_Tests: StreamChatTestCase { let button = ScrollToBottomButton(unreadCount: 3, onScrollToBottom: {}) // Then - assertSnapshot(matching: button, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(button) } func test_scrollToBottomButton_snapshotEmptyCount() { @@ -43,7 +43,7 @@ class MessageListView_Tests: StreamChatTestCase { let button = ScrollToBottomButton(unreadCount: 0, onScrollToBottom: {}) // Then - assertSnapshot(matching: button, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(button) } func test_messageListView_typingIndicator() { @@ -57,7 +57,7 @@ class MessageListView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: messageListView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(messageListView) } func test_messageListView_snapshotFallback() { @@ -72,7 +72,7 @@ class MessageListView_Tests: StreamChatTestCase { let view = Image(uiImage: snapshot) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } // MARK: - private diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageReadIndicatorView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageReadIndicatorView_Tests.swift index e9f06bf22..da1a3495c 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageReadIndicatorView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageReadIndicatorView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class MessageReadIndicatorView_Tests: StreamChatTestCase { @@ -18,7 +18,7 @@ class MessageReadIndicatorView_Tests: StreamChatTestCase { .frame(width: 50, height: 16) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageReadIndicatorView_snapshotMessageReadDirect() { @@ -30,7 +30,7 @@ class MessageReadIndicatorView_Tests: StreamChatTestCase { .frame(width: 50, height: 16) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageReadIndicatorView_snapshotMessageReadGroup() { @@ -42,7 +42,7 @@ class MessageReadIndicatorView_Tests: StreamChatTestCase { .frame(width: 50, height: 16) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageReadIndicatorView_snapshotPendingSend() { @@ -55,6 +55,6 @@ class MessageReadIndicatorView_Tests: StreamChatTestCase { .frame(width: 50, height: 16) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageViewMultiRowReactions_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageViewMultiRowReactions_Tests.swift index b69ba2d0b..05ba42fd0 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageViewMultiRowReactions_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageViewMultiRowReactions_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -60,7 +60,7 @@ final class MessageViewMultiRowReactions_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift index 9ccd775a5..93545dbbd 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/MessageView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -30,7 +30,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewImage_snapshot() { @@ -54,7 +54,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewImage_snapshot2Images() { @@ -81,7 +81,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewImage_snapshot3Images() { @@ -109,7 +109,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewImage_snapshotQuoted() { @@ -140,7 +140,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewGiphy_snapshot() { @@ -164,7 +164,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewVideo_snapshot() { @@ -188,7 +188,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewFile_snapshot() { @@ -212,7 +212,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewFileText_snapshot() { @@ -236,7 +236,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageViewJumboEmoji_snapshot() { @@ -259,7 +259,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_linkAttachmentView_snapshot() { @@ -282,7 +282,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_deletedMessageView_snapshot() { @@ -299,7 +299,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_deletedMessageViewContainer_snapshot() { @@ -322,7 +322,7 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_messageRepliesView_snapshot() { @@ -345,7 +345,7 @@ class MessageView_Tests: StreamChatTestCase { .frame(width: 300, height: 60) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_topLeftView_snapshot() { @@ -359,6 +359,6 @@ class MessageView_Tests: StreamChatTestCase { .applyDefaultSize() // When - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift index 58c548520..56bbd0075 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/QuotedMessageView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -28,7 +28,7 @@ class QuotedMessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_quotedMessageView_snapshot() { @@ -42,6 +42,6 @@ class QuotedMessageView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift index 3b728af4f..f28b8e55b 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsOverlayView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -45,7 +45,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { } // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_reactionsOverlayView_noReactions() { @@ -64,7 +64,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { } // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_reactionsOverlayView_usersReactions() { @@ -107,7 +107,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { } // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_reactionsOverlay_veryLongMessage() { @@ -143,7 +143,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { } // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_reactionAnimatableView_snapshot() { @@ -162,7 +162,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { .frame(width: 24, height: 24) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_reactionsOverlayContainer_snapshot() { @@ -177,7 +177,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { ) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_reactionsAnimatableView_snapshot() { @@ -193,7 +193,7 @@ class ReactionsOverlayView_Tests: StreamChatTestCase { ) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatMessage_reactionOffsetCurrentUser() { diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift index 02bd814e9..c72617b62 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/ReactionsUsersView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -34,7 +34,7 @@ class ReactionsUsersView_Tests: StreamChatTestCase { .frame(width: 250) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_reactionsUsersView_snapshotTwoRows() { @@ -66,6 +66,6 @@ class ReactionsUsersView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width, height: 320) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/Suggestions/InstantCommandsView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/Suggestions/InstantCommandsView_Tests.swift index eb73fd2ff..9c7e05007 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/Suggestions/InstantCommandsView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/Suggestions/InstantCommandsView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@testable import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class InstantCommandsView_Tests: StreamChatTestCase { @@ -23,7 +23,7 @@ class InstantCommandsView_Tests: StreamChatTestCase { .frame(width: defaultScreenSize.width, height: 100) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_instantCommandsContainerViewEmpty_snapshot() { @@ -35,7 +35,7 @@ class InstantCommandsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_instantCommandsContainerView_snapshot() { @@ -47,7 +47,7 @@ class InstantCommandsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_instantCommandsContainerMaxSize_snapshot() { @@ -62,7 +62,7 @@ class InstantCommandsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } private func defaultCommands(suffix: String = "") -> [CommandHandler] { diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/TypingIndicatorView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/TypingIndicatorView_Tests.swift index e1932c97c..ba04e24bc 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/TypingIndicatorView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/TypingIndicatorView_Tests.swift @@ -2,8 +2,8 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class TypingIndicatorView_Tests: StreamChatTestCase { @@ -14,6 +14,6 @@ class TypingIndicatorView_Tests: StreamChatTestCase { .frame(width: 20, height: 16) // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannel/WebView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannel/WebView_Tests.swift index e7510eba8..cbde47130 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannel/WebView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannel/WebView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class WebView_Tests: StreamChatTestCase { @@ -27,6 +27,6 @@ class WebView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: webView, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(webView) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListView_Tests.swift index 5132466d3..06c7dd56b 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/ChatChannelListView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -19,7 +19,7 @@ class ChatChannelListView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelListView_snapshot() { @@ -34,7 +34,7 @@ class ChatChannelListView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_chatChannelListViewSansNavigation_snapshot() { @@ -52,7 +52,7 @@ class ChatChannelListView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_trailingSwipeActionsView_snapshot() { @@ -67,7 +67,7 @@ class ChatChannelListView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } private func makeChannelListController() -> ChatChannelListController_Mock { diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/LoadingView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/LoadingView_Tests.swift index 7e9e7ac7c..d9932fb5c 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/LoadingView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/LoadingView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class LoadingView_Tests: StreamChatTestCase { @@ -18,7 +18,7 @@ class LoadingView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } func test_loadingView_snapshot() { @@ -27,6 +27,6 @@ class LoadingView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsFullScreenWrappingView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsFullScreenWrappingView_Tests.swift index af1255e75..c72a87285 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsFullScreenWrappingView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsFullScreenWrappingView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import SwiftUI import XCTest @@ -19,6 +19,6 @@ class MoreChannelActionsFullScreenWrappingView_Tests: StreamChatTestCase { ).applyDefaultSize() // Then - assertSnapshot(matching: wrappingView, as: .image) + AssertSnapshot(wrappingView) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsView_Tests.swift index 7fbfde516..89dc8d94d 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class MoreChannelActionsView_Tests: StreamChatTestCase { @@ -29,6 +29,6 @@ class MoreChannelActionsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98)) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/NoChannelsView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/NoChannelsView_Tests.swift index 41ed63157..416992dd2 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/NoChannelsView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/NoChannelsView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class NoChannelsView_Tests: StreamChatTestCase { @@ -15,6 +15,6 @@ class NoChannelsView_Tests: StreamChatTestCase { .frame(width: 375, height: 600) // Then - assertSnapshot(matching: view, as: .image) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift b/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift index 800965875..0b5ee1acd 100644 --- a/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift +++ b/StreamChatSwiftUITests/Tests/ChatChannelList/SearchResultsView_Tests.swift @@ -2,9 +2,9 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -import SnapshotTesting @testable import StreamChat @testable import StreamChatSwiftUI +@testable import StreamSwiftTestHelpers import XCTest class SearchResultsView_Tests: StreamChatTestCase { @@ -50,7 +50,7 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + AssertSnapshot(view) } func test_searchResultsView_snapshotNoResults() { @@ -72,7 +72,7 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + AssertSnapshot(view) } func test_searchResultsView_snapshotLoading() { @@ -94,6 +94,6 @@ class SearchResultsView_Tests: StreamChatTestCase { .applyDefaultSize() // Then - assertSnapshot(matching: view, as: .image) + AssertSnapshot(view) } } diff --git a/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift b/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift index 88a5487a1..faff58502 100644 --- a/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift +++ b/StreamChatSwiftUITests/Tests/StreamChatTestCase.swift @@ -4,7 +4,7 @@ @testable import StreamChat @testable import StreamChatSwiftUI -@_exported import StreamChatTestHelpers +@_exported import StreamSwiftTestHelpers @_exported import StreamChatTestTools import XCTest @@ -12,7 +12,6 @@ import XCTest open class StreamChatTestCase: XCTestCase { public static var currentUserId: String = .unique - public let snapshotPrecision: Float = 0.97 public var chatClient: ChatClient = { let client = ChatClient.mock(isLocalStorageEnabled: false) diff --git a/StreamChatSwiftUITestsAppTests/StreamChatSwiftUITests.swift b/StreamChatSwiftUITestsAppTests/StreamChatSwiftUITests.swift index a6b8c219e..48395f5ed 100644 --- a/StreamChatSwiftUITestsAppTests/StreamChatSwiftUITests.swift +++ b/StreamChatSwiftUITestsAppTests/StreamChatSwiftUITests.swift @@ -2,7 +2,7 @@ // Copyright © 2023 Stream.io Inc. All rights reserved. // -@_exported import StreamChatTestHelpers +@_exported import StreamSwiftTestHelpers @_exported import StreamChatTestMockServer import Foundation