Skip to content

Commit

Permalink
Update StreamSwiftTestHelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple committed Oct 5, 2023
1 parent ae41f3d commit 7ee7468
Show file tree
Hide file tree
Showing 37 changed files with 221 additions and 229 deletions.
152 changes: 72 additions & 80 deletions StreamChatSwiftUI.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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

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

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
AssertSnapshot(view)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
AssertSnapshot(view)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

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

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

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

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

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

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
AssertSnapshot(view)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

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

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

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

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
AssertSnapshot(view)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright © 2023 Stream.io Inc. All rights reserved.
//

import SnapshotTesting
@testable import StreamChat
@testable import StreamChatSwiftUI
import SwiftUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

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

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

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

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
AssertSnapshot(view)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
AssertSnapshot(view)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -51,7 +51,7 @@ class ChatChannelView_Tests: StreamChatTestCase {
.applyDefaultSize()

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

func test_chatChannelView_snapshotEmpty() {
Expand Down Expand Up @@ -82,7 +82,7 @@ class ChatChannelView_Tests: StreamChatTestCase {
.applyDefaultSize()

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

func test_chatChannelView_snapshotLoading() {
Expand All @@ -107,7 +107,7 @@ class ChatChannelView_Tests: StreamChatTestCase {
.applyDefaultSize()

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

func test_defaultChannelHeader_snapshot() {
Expand All @@ -126,6 +126,6 @@ class ChatChannelView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image(perceptualPrecision: snapshotPrecision))
AssertSnapshot(view)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@testable import StreamChat
@testable import StreamChatSwiftUI
@testable import StreamSwiftTestHelpers
import SwiftUI
import XCTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -30,7 +30,7 @@ class GalleryView_Tests: StreamChatTestCase {
.applyDefaultSize()

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

func test_galleryHeader_snapshot() {
Expand All @@ -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() {
Expand All @@ -55,6 +55,6 @@ class GalleryView_Tests: StreamChatTestCase {
.applyDefaultSize()

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

0 comments on commit 7ee7468

Please sign in to comment.