Skip to content

Commit

Permalink
Update StreamSwiftTestHelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple committed Oct 9, 2023
1 parent 5c84fb1 commit 3aff838
Show file tree
Hide file tree
Showing 30 changed files with 165 additions and 130 deletions.
46 changes: 27 additions & 19 deletions StreamChatSwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
8205B4142AD41CC700265B84 /* StreamSwiftTestHelpers in Frameworks */ = {isa = PBXBuildFile; productRef = 8205B4132AD41CC700265B84 /* StreamSwiftTestHelpers */; };
8205B4162AD41CD600265B84 /* StreamSwiftTestHelpers in Frameworks */ = {isa = PBXBuildFile; productRef = 8205B4152AD41CD600265B84 /* StreamSwiftTestHelpers */; };
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 */; };
Expand Down Expand Up @@ -216,7 +218,6 @@
847CEFEE27C38ABE00606257 /* MessageCachingUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847CEFED27C38ABE00606257 /* MessageCachingUtils.swift */; };
847F7949282A91AD0009F74C /* ChatChannelView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847F7948282A91AD0009F74C /* ChatChannelView_Tests.swift */; };
8482094E2ACFFCD900EF3261 /* Throttler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8482094D2ACFFCD900EF3261 /* Throttler.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 */; };
Expand Down Expand Up @@ -788,6 +789,7 @@
buildActionMask = 2147483647;
files = (
A35D803B283E89F50084FE25 /* StreamChatSwiftUI.framework in Frameworks */,
8205B4162AD41CD600265B84 /* StreamSwiftTestHelpers in Frameworks */,
8400A34C282C081E0067D3A0 /* OHHTTPStubs in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -807,8 +809,8 @@
buildActionMask = 2147483647;
files = (
8465FBBE2746873A00AF091E /* StreamChatSwiftUI.framework in Frameworks */,
8205B4142AD41CC700265B84 /* StreamSwiftTestHelpers in Frameworks */,
84E95A7D284A491000699FD3 /* StreamChatTestTools in Frameworks */,
848399EA275FB3E9003075E4 /* SnapshotTesting in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1617,6 +1619,7 @@
name = StreamChatSwiftUITestsApp;
packageProductDependencies = (
8400A34B282C081E0067D3A0 /* OHHTTPStubs */,
8205B4152AD41CD600265B84 /* StreamSwiftTestHelpers */,
);
productName = StreamChatSwiftUITestsApp;
productReference = 8402EAC3282BF69900CCA696 /* StreamChatSwiftUITestsApp.app */;
Expand Down Expand Up @@ -1662,8 +1665,8 @@
);
name = StreamChatSwiftUITests;
packageProductDependencies = (
848399E9275FB3E9003075E4 /* SnapshotTesting */,
84E95A7C284A491000699FD3 /* StreamChatTestTools */,
8205B4132AD41CC700265B84 /* StreamSwiftTestHelpers */,
);
productName = StreamChatSwiftUITests;
productReference = 8465FBBD2746873A00AF091E /* StreamChatSwiftUITests.xctest */;
Expand Down Expand Up @@ -1732,12 +1735,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" */,
82543C7B2AD41B0400D5F6CD /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */,
);
productRefGroup = 8465FBB62746873A00AF091E /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -2708,6 +2711,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
82543C7B2AD41B0400D5F6CD /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/GetStream/stream-chat-swift-test-helpers.git";
requirement = {
kind = exactVersion;
version = 0.3.0;
};
};
8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/AliSoftware/OHHTTPStubs.git";
Expand All @@ -2732,20 +2743,12 @@
version = 4.10.1;
};
};
848399E6275FB3BE003075E4 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing.git";
requirement = {
kind = exactVersion;
version = 1.11.0;
};
};
84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.39.0;
branch = ci/spm;
kind = branch;
};
};
A3571601283E9D9F0014E3B0 /* XCRemoteSwiftPackageReference "swifter" */ = {
Expand All @@ -2767,6 +2770,16 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
8205B4132AD41CC700265B84 /* StreamSwiftTestHelpers */ = {
isa = XCSwiftPackageProductDependency;
package = 82543C7B2AD41B0400D5F6CD /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */;
productName = StreamSwiftTestHelpers;
};
8205B4152AD41CD600265B84 /* StreamSwiftTestHelpers */ = {
isa = XCSwiftPackageProductDependency;
package = 82543C7B2AD41B0400D5F6CD /* XCRemoteSwiftPackageReference "stream-chat-swift-test-helpers" */;
productName = StreamSwiftTestHelpers;
};
8400A34B282C081E0067D3A0 /* OHHTTPStubs */ = {
isa = XCSwiftPackageProductDependency;
package = 8400A346282C06F90067D3A0 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */;
Expand Down Expand Up @@ -2797,11 +2810,6 @@
package = 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */;
productName = StreamChatTestTools;
};
848399E9275FB3E9003075E4 /* SnapshotTesting */ = {
isa = XCSwiftPackageProductDependency;
package = 848399E6275FB3BE003075E4 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
productName = SnapshotTesting;
};
84B87F222861C0C900959CBE /* StreamChat */ = {
isa = XCSwiftPackageProductDependency;
package = 84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@testable import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand All @@ -25,6 +26,6 @@ class AddUsersView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@testable import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand All @@ -26,7 +27,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_chatChannelInfoView_directChannelOnlineSnapshot() {
Expand All @@ -46,7 +47,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_chatChannelInfoView_directChannelMutedSnapshot() {
Expand All @@ -66,7 +67,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_chatChannelInfoView_groupCollapsedSnapshot() {
Expand All @@ -89,7 +90,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_chatChannelInfoView_smallGroupSnapshot() {
Expand All @@ -112,7 +113,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_chatChannelInfoView_groupExpandedSnapshot() {
Expand All @@ -137,7 +138,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_chatChannelInfoView_navBarSnapshot() {
Expand Down Expand Up @@ -166,7 +167,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: navigationView, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: navigationView, as: .image(perceptualPrecision: precision))
}

func test_chatChannelInfoView_addUsersShownSnapshot() {
Expand All @@ -191,6 +192,6 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@testable import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand All @@ -25,7 +26,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_fileAttachmentsView_emptySnapshot() {
Expand All @@ -40,7 +41,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_fileAttachmentsView_loadingSnapshot() {
Expand All @@ -55,7 +56,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_fileAttachmentsPickerView_snapshot() {
Expand All @@ -64,6 +65,6 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@testable import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand All @@ -28,7 +29,7 @@ class MediaAttachmentsView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_mediaAttachmentsView_emptySnapshot() {
Expand All @@ -41,7 +42,7 @@ class MediaAttachmentsView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_mediaAttachmentsView_loading() {
Expand All @@ -54,6 +55,6 @@ class MediaAttachmentsView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@testable import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand All @@ -27,7 +28,7 @@ class PinnedMessagesView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_pinnedMessagesView_emptySnapshot() {
Expand All @@ -39,7 +40,7 @@ class PinnedMessagesView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand All @@ -23,7 +24,7 @@ class ChatChannelHeader_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_chatChannelHeader_snapshot() {
Expand All @@ -41,7 +42,7 @@ class ChatChannelHeader_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}

func test_channelTitleView_snapshot() {
Expand All @@ -53,6 +54,6 @@ class ChatChannelHeader_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@testable import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand Down Expand Up @@ -62,6 +63,6 @@ class ChatChannelViewDateOverlay_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
}
}
Loading

0 comments on commit 3aff838

Please sign in to comment.