This commit is contained in:
David Roman 2023-06-03 17:34:48 +01:00
parent 7e95a56fed
commit 21b0e11d09
No known key found for this signature in database
GPG Key ID: 7058646EEFCB70A7
1 changed files with 8 additions and 16 deletions

View File

@ -22,10 +22,8 @@ final class SearchFieldTests: XCTestCase {
.searchable(text: .constant(""))
}
.navigationViewStyle(.stack)
#if os(iOS)
.introspect(.searchField, on: .iOS(.v15, .v16), customize: spy)
#elseif os(tvOS)
.introspect(.searchField, on: .tvOS(.v15, .v16), customize: spy)
#if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), customize: spy)
#endif
}
}
@ -41,10 +39,8 @@ final class SearchFieldTests: XCTestCase {
NavigationView {
Text("Customized")
.searchable(text: .constant(""))
#if os(iOS)
.introspect(.searchField, on: .iOS(.v15, .v16), scope: .ancestor, customize: spy)
#elseif os(tvOS)
.introspect(.searchField, on: .tvOS(.v15, .v16), scope: .ancestor, customize: spy)
#if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), scope: .ancestor, customize: spy)
#endif
}
.navigationViewStyle(.stack)
@ -64,10 +60,8 @@ final class SearchFieldTests: XCTestCase {
.searchable(text: .constant(""))
}
.navigationViewStyle(DoubleColumnNavigationViewStyle())
#if os(iOS)
.introspect(.searchField, on: .iOS(.v15, .v16), customize: spy)
#elseif os(tvOS)
.introspect(.searchField, on: .tvOS(.v15, .v16), customize: spy)
#if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), customize: spy)
#endif
}
}
@ -83,10 +77,8 @@ final class SearchFieldTests: XCTestCase {
NavigationView {
Text("Customized")
.searchable(text: .constant(""))
#if os(iOS)
.introspect(.searchField, on: .iOS(.v15, .v16), scope: .ancestor, customize: spy)
#elseif os(tvOS)
.introspect(.searchField, on: .tvOS(.v15, .v16), scope: .ancestor, customize: spy)
#if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), scope: .ancestor, customize: spy)
#endif
}
.navigationViewStyle(DoubleColumnNavigationViewStyle())