Skip to content

Commit 7b3bc11

Browse files
Added tests for scroll to bottom button
1 parent 7f6a3f9 commit 7b3bc11

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

StreamChatSwiftUITests/Tests/ChatChannel/MessageListView_Tests.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,22 @@ class MessageListView_Tests: StreamChatTestCase {
2929
assertSnapshot(matching: messageListView, as: .image)
3030
}
3131

32+
func test_scrollToBottomButton_snapshotUnreadCount() {
33+
// Given
34+
let button = ScrollToBottomButton(unreadCount: 3, onScrollToBottom: {})
35+
36+
// Then
37+
assertSnapshot(matching: button, as: .image)
38+
}
39+
40+
func test_scrollToBottomButton_snapshotEmptyCount() {
41+
// Given
42+
let button = ScrollToBottomButton(unreadCount: 0, onScrollToBottom: {})
43+
44+
// Then
45+
assertSnapshot(matching: button, as: .image)
46+
}
47+
3248
// MARK: - private
3349

3450
private func makeMessageListView(channelConfig: ChannelConfig) -> MessageListView<DefaultViewFactory> {
Loading
Loading

0 commit comments

Comments
 (0)