Skip to content

Commit 29fe0cb

Browse files
committed
Add MessageReadIndicatorView_Tests
1 parent 9404032 commit 29fe0cb

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3945,7 +3945,7 @@
39453945
isa = XCRemoteSwiftPackageReference;
39463946
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
39473947
requirement = {
3948-
branch = develop;
3948+
branch = release/4.92.0;
39493949
kind = branch;
39503950
};
39513951
};

StreamChatSwiftUITests/Tests/ChatChannel/MessageReadIndicatorView_Tests.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,30 @@ class MessageReadIndicatorView_Tests: StreamChatTestCase {
122122
// Then
123123
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
124124
}
125+
126+
func test_messageReadIndicatorView_snapshotMessageDelivered() {
127+
// Given
128+
let view = MessageReadIndicatorView(
129+
readUsers: [],
130+
showReadCount: false,
131+
showDelivered: true
132+
)
133+
.frame(width: 50, height: 16)
134+
135+
// Then
136+
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
137+
}
138+
139+
func test_messageReadIndicatorView_snapshotMessageDeliveredAndRead() {
140+
// Given
141+
let view = MessageReadIndicatorView(
142+
readUsers: [.mock(id: .unique), .mock(id: .unique)],
143+
showReadCount: true,
144+
showDelivered: true
145+
)
146+
.frame(width: 50, height: 16)
147+
148+
// Then
149+
assertSnapshot(matching: view, as: .image(perceptualPrecision: precision))
150+
}
125151
}
Loading
Loading

0 commit comments

Comments
 (0)