File tree Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Original file line number Diff line number Diff line change 11#if !os(macOS)
22import SwiftUI
33import SwiftUIIntrospect
4- import XCTest
4+ import Testing
55
6- @available ( iOS 16 , tvOS 16 , * )
76@MainActor
8- final class NavigationStackTests : XCTestCase {
7+ @Suite
8+ struct NavigationStackTests {
99 #if canImport(UIKit)
1010 typealias PlatformNavigationStack = UINavigationController
1111 #endif
1212
13- func testNavigationStack( ) throws {
14- guard #available( iOS 16 , tvOS 16 , * ) else {
15- throw XCTSkip ( )
16- }
17-
18- XCTAssertViewIntrospection ( of: PlatformNavigationStack . self) { spies in
19- let spy = spies [ 0 ]
20-
13+ @available ( iOS 16 , tvOS 16 , * )
14+ @Test func introspect( ) async throws {
15+ try await introspection ( of: PlatformNavigationStack . self) { spy in
2116 NavigationStack {
2217 ZStack {
2318 Color . red
@@ -30,14 +25,9 @@ final class NavigationStackTests: XCTestCase {
3025 }
3126 }
3227
33- func testNavigationStackAsAncestor( ) throws {
34- guard #available( iOS 16 , tvOS 16 , * ) else {
35- throw XCTSkip ( )
36- }
37-
38- XCTAssertViewIntrospection ( of: PlatformNavigationStack . self) { spies in
39- let spy = spies [ 0 ]
40-
28+ @available ( iOS 16 , tvOS 16 , * )
29+ @Test func introspectAsAncestor( ) async throws {
30+ try await introspection ( of: PlatformNavigationStack . self) { spy in
4131 NavigationStack {
4232 ZStack {
4333 Color . red
You can’t perform that action at this time.
0 commit comments