This commit is contained in:
David Roman 2023-06-06 00:58:16 +01:00
parent de4f8692eb
commit 4ceb56c8e2
No known key found for this signature in database
GPG Key ID: 7058646EEFCB70A7
30 changed files with 149 additions and 116 deletions

View File

@ -25,7 +25,7 @@ struct ContentView: View {
.tag(4) .tag(4)
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { tabBarController in .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { tabBarController in
tabBarController.tabBar.layer.backgroundColor = UIColor.green.cgColor tabBarController.tabBar.layer.backgroundColor = UIColor.green.cgColor
} }
#elseif os(macOS) #elseif os(macOS)
@ -62,7 +62,7 @@ struct ListShowcase: View {
Text("Item 2") Text("Item 2")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { tableView in .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { tableView in
tableView.backgroundView = UIView() tableView.backgroundView = UIView()
tableView.backgroundColor = .cyan tableView.backgroundColor = .cyan
} }
@ -87,7 +87,7 @@ struct ListShowcase: View {
Text("Item 1") Text("Item 1")
Text("Item 2") Text("Item 2")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { tableView in .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { tableView in
tableView.backgroundView = UIView() tableView.backgroundView = UIView()
tableView.backgroundColor = .cyan tableView.backgroundColor = .cyan
} }
@ -127,7 +127,7 @@ struct ScrollViewShowcase: View {
.font(.system(.subheadline, design: .monospaced)) .font(.system(.subheadline, design: .monospaced))
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { scrollView in .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { scrollView in
scrollView.layer.backgroundColor = UIColor.cyan.cgColor scrollView.layer.backgroundColor = UIColor.cyan.cgColor
} }
#elseif os(macOS) #elseif os(macOS)
@ -145,7 +145,7 @@ struct ScrollViewShowcase: View {
.padding(.horizontal, 12) .padding(.horizontal, 12)
.font(.system(.subheadline, design: .monospaced)) .font(.system(.subheadline, design: .monospaced))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { scrollView in .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { scrollView in
scrollView.layer.backgroundColor = UIColor.cyan.cgColor scrollView.layer.backgroundColor = UIColor.cyan.cgColor
} }
#elseif os(macOS) #elseif os(macOS)
@ -177,16 +177,16 @@ struct NavigationShowcase: View {
#endif #endif
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { navigationController in .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { navigationController in
navigationController.navigationBar.backgroundColor = .cyan navigationController.navigationBar.backgroundColor = .cyan
} }
.introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16)) { splitViewController in .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { splitViewController in
splitViewController.preferredDisplayMode = .oneOverSecondary splitViewController.preferredDisplayMode = .oneOverSecondary
} }
.introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16)) { navigationController in .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { navigationController in
navigationController.navigationBar.backgroundColor = .cyan navigationController.navigationBar.backgroundColor = .cyan
} }
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16)) { searchBar in .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17)) { searchBar in
searchBar.backgroundColor = .red searchBar.backgroundColor = .red
#if os(iOS) #if os(iOS)
searchBar.searchTextField.backgroundColor = .purple searchBar.searchTextField.backgroundColor = .purple
@ -209,7 +209,7 @@ struct ViewControllerShowcase: View {
} }
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)
.introspect(.view, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { viewController in .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { viewController in
viewController.children.first?.view.backgroundColor = .cyan viewController.children.first?.view.backgroundColor = .cyan
} }
} }
@ -229,7 +229,7 @@ struct SimpleElementsShowcase: View {
HStack { HStack {
TextField("Text Field Red", text: $textFieldValue) TextField("Text Field Red", text: $textFieldValue)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { textField in .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { textField in
textField.backgroundColor = .red textField.backgroundColor = .red
} }
#elseif os(macOS) #elseif os(macOS)
@ -241,7 +241,7 @@ struct SimpleElementsShowcase: View {
TextField("Text Field Green", text: $textFieldValue) TextField("Text Field Green", text: $textFieldValue)
.cornerRadius(8) .cornerRadius(8)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { textField in .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { textField in
textField.backgroundColor = .green textField.backgroundColor = .green
} }
#elseif os(macOS) #elseif os(macOS)
@ -254,7 +254,7 @@ struct SimpleElementsShowcase: View {
HStack { HStack {
Toggle("Toggle Red", isOn: $toggleValue) Toggle("Toggle Red", isOn: $toggleValue)
#if os(iOS) #if os(iOS)
.introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16)) { toggle in .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { toggle in
toggle.backgroundColor = .red toggle.backgroundColor = .red
} }
#elseif os(macOS) #elseif os(macOS)
@ -265,7 +265,7 @@ struct SimpleElementsShowcase: View {
Toggle("Toggle Green", isOn: $toggleValue) Toggle("Toggle Green", isOn: $toggleValue)
#if os(iOS) #if os(iOS)
.introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16)) { toggle in .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { toggle in
toggle.backgroundColor = .green toggle.backgroundColor = .green
} }
#elseif os(macOS) #elseif os(macOS)
@ -279,7 +279,7 @@ struct SimpleElementsShowcase: View {
HStack { HStack {
Slider(value: $sliderValue, in: 0...100) Slider(value: $sliderValue, in: 0...100)
#if os(iOS) #if os(iOS)
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16)) { slider in .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { slider in
slider.backgroundColor = .red slider.backgroundColor = .red
} }
#elseif os(macOS) #elseif os(macOS)
@ -290,7 +290,7 @@ struct SimpleElementsShowcase: View {
Slider(value: $sliderValue, in: 0...100) Slider(value: $sliderValue, in: 0...100)
#if os(iOS) #if os(iOS)
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16)) { slider in .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { slider in
slider.backgroundColor = .green slider.backgroundColor = .green
} }
#elseif os(macOS) #elseif os(macOS)
@ -305,7 +305,7 @@ struct SimpleElementsShowcase: View {
Text("Stepper Red") Text("Stepper Red")
} }
#if os(iOS) #if os(iOS)
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16)) { stepper in .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { stepper in
stepper.backgroundColor = .red stepper.backgroundColor = .red
} }
#elseif os(macOS) #elseif os(macOS)
@ -318,7 +318,7 @@ struct SimpleElementsShowcase: View {
Text("Stepper Green") Text("Stepper Green")
} }
#if os(iOS) #if os(iOS)
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16)) { stepper in .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { stepper in
stepper.backgroundColor = .green stepper.backgroundColor = .green
} }
#elseif os(macOS) #elseif os(macOS)
@ -333,7 +333,7 @@ struct SimpleElementsShowcase: View {
Text("DatePicker Red") Text("DatePicker Red")
} }
#if os(iOS) #if os(iOS)
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16)) { datePicker in .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { datePicker in
datePicker.backgroundColor = .red datePicker.backgroundColor = .red
} }
#elseif os(macOS) #elseif os(macOS)
@ -352,7 +352,7 @@ struct SimpleElementsShowcase: View {
} }
.pickerStyle(SegmentedPickerStyle()) .pickerStyle(SegmentedPickerStyle())
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { datePicker in .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { datePicker in
datePicker.backgroundColor = .red datePicker.backgroundColor = .red
} }
#elseif os(macOS) #elseif os(macOS)

View File

@ -4,28 +4,39 @@ import XCTest
final class PlatformTests: XCTestCase { final class PlatformTests: XCTestCase {
func test_iOS() { func test_iOS() {
#if os(iOS) #if os(iOS)
if #available(iOS 16, *) { if #available(iOS 17, *) {
XCTAssertEqual(iOSVersion.v17.isCurrent, true)
XCTAssertEqual(iOSVersion.v16.isCurrent, false)
XCTAssertEqual(iOSVersion.v15.isCurrent, false)
XCTAssertEqual(iOSVersion.v14.isCurrent, false)
XCTAssertEqual(iOSVersion.v13.isCurrent, false)
} else if #available(iOS 16, *) {
XCTAssertEqual(iOSVersion.v17.isCurrent, false)
XCTAssertEqual(iOSVersion.v16.isCurrent, true) XCTAssertEqual(iOSVersion.v16.isCurrent, true)
XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false)
XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false)
XCTAssertEqual(iOSVersion.v13.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false)
} else if #available(iOS 15, *) { } else if #available(iOS 15, *) {
XCTAssertEqual(iOSVersion.v17.isCurrent, false)
XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false)
XCTAssertEqual(iOSVersion.v15.isCurrent, true) XCTAssertEqual(iOSVersion.v15.isCurrent, true)
XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false)
XCTAssertEqual(iOSVersion.v13.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false)
} else if #available(iOS 14, *) { } else if #available(iOS 14, *) {
XCTAssertEqual(iOSVersion.v17.isCurrent, false)
XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false)
XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false)
XCTAssertEqual(iOSVersion.v14.isCurrent, true) XCTAssertEqual(iOSVersion.v14.isCurrent, true)
XCTAssertEqual(iOSVersion.v13.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false)
} else if #available(iOS 13, *) { } else if #available(iOS 13, *) {
XCTAssertEqual(iOSVersion.v17.isCurrent, false)
XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false)
XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false)
XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false)
XCTAssertEqual(iOSVersion.v13.isCurrent, true) XCTAssertEqual(iOSVersion.v13.isCurrent, true)
} }
#else #else
XCTAssertEqual(iOSVersion.v17.isCurrent, false)
XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false)
XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false)
XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false)
@ -35,28 +46,39 @@ final class PlatformTests: XCTestCase {
func test_macOS() { func test_macOS() {
#if os(macOS) #if os(macOS)
if #available(macOS 13, *) { if #available(macOS 14, *) {
XCTAssertEqual(macOSVersion.v14.isCurrent, true)
XCTAssertEqual(macOSVersion.v13.isCurrent, false)
XCTAssertEqual(macOSVersion.v12.isCurrent, false)
XCTAssertEqual(macOSVersion.v11.isCurrent, false)
XCTAssertEqual(macOSVersion.v10_15.isCurrent, false)
} else if #available(macOS 13, *) {
XCTAssertEqual(macOSVersion.v14.isCurrent, false)
XCTAssertEqual(macOSVersion.v13.isCurrent, true) XCTAssertEqual(macOSVersion.v13.isCurrent, true)
XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false)
XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false)
XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false)
} else if #available(macOS 12, *) { } else if #available(macOS 12, *) {
XCTAssertEqual(macOSVersion.v14.isCurrent, false)
XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false)
XCTAssertEqual(macOSVersion.v12.isCurrent, true) XCTAssertEqual(macOSVersion.v12.isCurrent, true)
XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false)
XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false)
} else if #available(macOS 11, *) { } else if #available(macOS 11, *) {
XCTAssertEqual(macOSVersion.v14.isCurrent, false)
XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false)
XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false)
XCTAssertEqual(macOSVersion.v11.isCurrent, true) XCTAssertEqual(macOSVersion.v11.isCurrent, true)
XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false)
} else if #available(macOS 10.15, *) { } else if #available(macOS 10.15, *) {
XCTAssertEqual(macOSVersion.v14.isCurrent, false)
XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false)
XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false)
XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false)
XCTAssertEqual(macOSVersion.v10_15.isCurrent, true) XCTAssertEqual(macOSVersion.v10_15.isCurrent, true)
} }
#else #else
XCTAssertEqual(macOSVersion.v14.isCurrent, false)
XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false)
XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false)
XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false)
@ -66,28 +88,39 @@ final class PlatformTests: XCTestCase {
func test_tvOS() { func test_tvOS() {
#if os(tvOS) #if os(tvOS)
if #available(tvOS 16, *) { if #available(tvOS 17, *) {
XCTAssertEqual(tvOSVersion.v17.isCurrent, true)
XCTAssertEqual(tvOSVersion.v16.isCurrent, false)
XCTAssertEqual(tvOSVersion.v15.isCurrent, false)
XCTAssertEqual(tvOSVersion.v14.isCurrent, false)
XCTAssertEqual(tvOSVersion.v13.isCurrent, false)
} else if #available(tvOS 16, *) {
XCTAssertEqual(tvOSVersion.v17.isCurrent, false)
XCTAssertEqual(tvOSVersion.v16.isCurrent, true) XCTAssertEqual(tvOSVersion.v16.isCurrent, true)
XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false)
XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false)
XCTAssertEqual(tvOSVersion.v13.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false)
} else if #available(tvOS 15, *) { } else if #available(tvOS 15, *) {
XCTAssertEqual(tvOSVersion.v17.isCurrent, false)
XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false)
XCTAssertEqual(tvOSVersion.v15.isCurrent, true) XCTAssertEqual(tvOSVersion.v15.isCurrent, true)
XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false)
XCTAssertEqual(tvOSVersion.v13.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false)
} else if #available(tvOS 14, *) { } else if #available(tvOS 14, *) {
XCTAssertEqual(tvOSVersion.v17.isCurrent, false)
XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false)
XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false)
XCTAssertEqual(tvOSVersion.v14.isCurrent, true) XCTAssertEqual(tvOSVersion.v14.isCurrent, true)
XCTAssertEqual(tvOSVersion.v13.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false)
} else if #available(tvOS 13, *) { } else if #available(tvOS 13, *) {
XCTAssertEqual(tvOSVersion.v17.isCurrent, false)
XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false)
XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false)
XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false)
XCTAssertEqual(tvOSVersion.v13.isCurrent, true) XCTAssertEqual(tvOSVersion.v13.isCurrent, true)
} }
#else #else
XCTAssertEqual(tvOSVersion.v17.isCurrent, false)
XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false)
XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false)
XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false)

View File

@ -26,21 +26,21 @@ final class ColorPickerTests: XCTestCase {
VStack { VStack {
ColorPicker("", selection: .constant(PlatformColor.red.cgColor)) ColorPicker("", selection: .constant(PlatformColor.red.cgColor))
#if os(iOS) #if os(iOS)
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16), customize: spy0) .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
ColorPicker("", selection: .constant(PlatformColor.green.cgColor)) ColorPicker("", selection: .constant(PlatformColor.green.cgColor))
#if os(iOS) #if os(iOS)
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16), customize: spy1) .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
ColorPicker("", selection: .constant(PlatformColor.blue.cgColor)) ColorPicker("", selection: .constant(PlatformColor.blue.cgColor))
#if os(iOS) #if os(iOS)
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16), customize: spy2) .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -23,7 +23,7 @@ final class DatePickerTests: XCTestCase {
VStack { VStack {
DatePicker("", selection: .constant(date0)) DatePicker("", selection: .constant(date0))
#if os(iOS) #if os(iOS)
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -31,7 +31,7 @@ final class DatePickerTests: XCTestCase {
DatePicker("", selection: .constant(date1)) DatePicker("", selection: .constant(date1))
#if os(iOS) #if os(iOS)
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -39,7 +39,7 @@ final class DatePickerTests: XCTestCase {
DatePicker("", selection: .constant(date2)) DatePicker("", selection: .constant(date2))
#if os(iOS) #if os(iOS)
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -29,7 +29,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase {
DatePicker("", selection: .constant(date0)) DatePicker("", selection: .constant(date0))
.datePickerStyle(.compact) .datePickerStyle(.compact)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16), customize: spy0) .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -38,7 +38,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase {
DatePicker("", selection: .constant(date1)) DatePicker("", selection: .constant(date1))
.datePickerStyle(.compact) .datePickerStyle(.compact)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16), customize: spy1) .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -47,7 +47,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase {
DatePicker("", selection: .constant(date2)) DatePicker("", selection: .constant(date2))
.datePickerStyle(.compact) .datePickerStyle(.compact)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16), customize: spy2) .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -29,7 +29,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase {
DatePicker("", selection: .constant(date0)) DatePicker("", selection: .constant(date0))
.datePickerStyle(.graphical) .datePickerStyle(.graphical)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16), customize: spy0) .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -38,7 +38,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase {
DatePicker("", selection: .constant(date1)) DatePicker("", selection: .constant(date1))
.datePickerStyle(.graphical) .datePickerStyle(.graphical)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16), customize: spy1) .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -47,7 +47,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase {
DatePicker("", selection: .constant(date2)) DatePicker("", selection: .constant(date2))
.datePickerStyle(.graphical) .datePickerStyle(.graphical)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16), customize: spy2) .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -22,21 +22,21 @@ final class DatePickerWithWheelStyleTests: XCTestCase {
DatePicker("", selection: .constant(date0)) DatePicker("", selection: .constant(date0))
.datePickerStyle(.wheel) .datePickerStyle(.wheel)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#endif #endif
.cornerRadius(8) .cornerRadius(8)
DatePicker("", selection: .constant(date1)) DatePicker("", selection: .constant(date1))
.datePickerStyle(.wheel) .datePickerStyle(.wheel)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#endif #endif
.cornerRadius(8) .cornerRadius(8)
DatePicker("", selection: .constant(date2)) DatePicker("", selection: .constant(date2))
.datePickerStyle(.wheel) .datePickerStyle(.wheel)
#if os(iOS) #if os(iOS)
.introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#endif #endif
} }
} extraAssertions: { } extraAssertions: {

View File

@ -20,14 +20,14 @@ final class FormTests: XCTestCase {
Text("Item 1") Text("Item 1")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy0($0) } .introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) }
.introspect(.form, on: .iOS(.v16, .v17)) { spy0($0) } .introspect(.form, on: .iOS(.v16, .v17)) { spy0($0) }
#endif #endif
Form { Form {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { spy1($0) } .introspect(.form, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) }
.introspect(.form, on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) } .introspect(.form, on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) }
#endif #endif
} }

View File

@ -16,7 +16,7 @@ final class ListCellTests: XCTestCase {
List { List {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy($0) } .introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy($0) }
.introspect(.listCell, on: .iOS(.v16, .v17)) { spy($0) } .introspect(.listCell, on: .iOS(.v16, .v17)) { spy($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) } .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) }
@ -32,7 +32,7 @@ final class ListCellTests: XCTestCase {
List { List {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy($0) } .introspect(.listCell, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy($0) }
.introspect(.listCell, on: .iOS(.v16, .v17)) { spy($0) } .introspect(.listCell, on: .iOS(.v16, .v17)) { spy($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) } .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) }

View File

@ -19,7 +19,7 @@ final class ListTests: XCTestCase {
Text("Item 1") Text("Item 1")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy0($0) } .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) }
.introspect(.list, on: .iOS(.v16, .v17)) { spy0($0) } .introspect(.list, on: .iOS(.v16, .v17)) { spy0($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) }
@ -28,7 +28,7 @@ final class ListTests: XCTestCase {
List { List {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { spy1($0) } .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) }
.introspect(.list, on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) } .introspect(.list, on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) }
@ -53,12 +53,12 @@ final class ListTests: XCTestCase {
Text("Item 1") Text("Item 1")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy1($0) } .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy1($0) }
.introspect(.list, on: .iOS(.v16, .v17)) { spy1($0) } .introspect(.list, on: .iOS(.v16, .v17)) { spy1($0) }
#endif #endif
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy0($0) } .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) }
.introspect(.list, on: .iOS(.v16, .v17)) { spy0($0) } .introspect(.list, on: .iOS(.v16, .v17)) { spy0($0) }
#endif #endif
} extraAssertions: { } extraAssertions: {
@ -77,7 +77,7 @@ final class ListTests: XCTestCase {
Text("Item 1") Text("Item 1")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy0($0) } .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) }
.introspect(.list, on: .iOS(.v16, .v17)) { spy0($0) } .introspect(.list, on: .iOS(.v16, .v17)) { spy0($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) }
@ -89,7 +89,7 @@ final class ListTests: XCTestCase {
List { List {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { spy1($0) } .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) }
.introspect(.list, on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) } .introspect(.list, on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) }

View File

@ -19,14 +19,14 @@ final class ListWithGroupedStyleTests: XCTestCase {
} }
.listStyle(.grouped) .listStyle(.grouped)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy0($0) } .introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) }
.introspect(.list(style: .grouped), on: .iOS(.v16, .v17)) { spy0($0) } .introspect(.list(style: .grouped), on: .iOS(.v16, .v17)) { spy0($0) }
#endif #endif
List { List {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { spy1($0) } .introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) }
.introspect(.list(style: .grouped), on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) } .introspect(.list(style: .grouped), on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) }
#endif #endif
} }

View File

@ -20,7 +20,7 @@ final class ListWithPlainStyleTests: XCTestCase {
} }
.listStyle(.plain) .listStyle(.plain)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { spy0($0) } .introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { spy0($0) }
.introspect(.list(style: .plain), on: .iOS(.v16, .v17)) { spy0($0) } .introspect(.list(style: .plain), on: .iOS(.v16, .v17)) { spy0($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } .introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) }
@ -29,7 +29,7 @@ final class ListWithPlainStyleTests: XCTestCase {
List { List {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { spy1($0) } .introspect(.list(style: .plain), on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { spy1($0) }
.introspect(.list(style: .plain), on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) } .introspect(.list(style: .plain), on: .iOS(.v16, .v17), scope: .ancestor) { spy1($0) }
#elseif os(macOS) #elseif os(macOS)
.introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } .introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) }

View File

@ -23,9 +23,9 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase {
} }
.navigationViewStyle(DoubleColumnNavigationViewStyle()) .navigationViewStyle(DoubleColumnNavigationViewStyle())
#if os(iOS) #if os(iOS)
.introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16), customize: spy) .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy)
#elseif os(tvOS) #elseif os(tvOS)
.introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16), customize: spy) .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy)
#elseif os(macOS) #elseif os(macOS)
.introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy) .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy)
#endif #endif
@ -41,9 +41,9 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase {
Color.red Color.red
Text("Something") Text("Something")
#if os(iOS) #if os(iOS)
.introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16), scope: .ancestor, customize: spy) .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy)
#elseif os(tvOS) #elseif os(tvOS)
.introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor, customize: spy) .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy)
#elseif os(macOS) #elseif os(macOS)
.introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy) .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy)
#endif #endif
@ -52,7 +52,7 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase {
.navigationViewStyle(DoubleColumnNavigationViewStyle()) .navigationViewStyle(DoubleColumnNavigationViewStyle())
#if os(iOS) #if os(iOS)
// NB: this is necessary for ancestor introspection to work, because initially on iPad the "Customized" text isn't shown as it's hidden in the sidebar. This is why ancestor introspection is discouraged for most situations and it's opt-in. // NB: this is necessary for ancestor introspection to work, because initially on iPad the "Customized" text isn't shown as it's hidden in the sidebar. This is why ancestor introspection is discouraged for most situations and it's opt-in.
.introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16)) { .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) {
$0.preferredDisplayMode = .oneOverSecondary $0.preferredDisplayMode = .oneOverSecondary
} }
#endif #endif

View File

@ -20,7 +20,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase {
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy) .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy)
#endif #endif
} }
} }
@ -34,7 +34,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase {
Color.red Color.red
Text("Something") Text("Something")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor, customize: spy) .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy)
#endif #endif
} }
} }

View File

@ -21,7 +21,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase {
} }
.pickerStyle(.segmented) .pickerStyle(.segmented)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -33,7 +33,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase {
} }
.pickerStyle(.segmented) .pickerStyle(.segmented)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -46,7 +46,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase {
} }
.pickerStyle(.segmented) .pickerStyle(.segmented)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -20,7 +20,7 @@ final class PickerWithWheelStyleTests: XCTestCase {
} }
.pickerStyle(.wheel) .pickerStyle(.wheel)
#if os(iOS) #if os(iOS)
.introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#endif #endif
.cornerRadius(8) .cornerRadius(8)
@ -30,7 +30,7 @@ final class PickerWithWheelStyleTests: XCTestCase {
} }
.pickerStyle(.wheel) .pickerStyle(.wheel)
#if os(iOS) #if os(iOS)
.introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#endif #endif
.cornerRadius(8) .cornerRadius(8)
@ -41,7 +41,7 @@ final class PickerWithWheelStyleTests: XCTestCase {
} }
.pickerStyle(.wheel) .pickerStyle(.wheel)
#if os(iOS) #if os(iOS)
.introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#endif #endif
} }
} extraAssertions: { } extraAssertions: {

View File

@ -23,7 +23,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase {
ProgressView(value: 0.25) ProgressView(value: 0.25)
.progressViewStyle(.circular) .progressViewStyle(.circular)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), customize: spy0) .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -31,7 +31,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase {
ProgressView(value: 0.5) ProgressView(value: 0.5)
.progressViewStyle(.circular) .progressViewStyle(.circular)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), customize: spy1) .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -39,7 +39,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase {
ProgressView(value: 0.75) ProgressView(value: 0.75)
.progressViewStyle(.circular) .progressViewStyle(.circular)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), customize: spy2) .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -23,7 +23,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase {
ProgressView(value: 0.25) ProgressView(value: 0.25)
.progressViewStyle(.linear) .progressViewStyle(.linear)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), customize: spy0) .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -31,7 +31,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase {
ProgressView(value: 0.5) ProgressView(value: 0.5)
.progressViewStyle(.linear) .progressViewStyle(.linear)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), customize: spy1) .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -39,7 +39,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase {
ProgressView(value: 0.75) ProgressView(value: 0.75)
.progressViewStyle(.linear) .progressViewStyle(.linear)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), customize: spy2) .introspect(.progressView(style: .linear), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -19,7 +19,7 @@ final class ScrollViewTests: XCTestCase {
Text("Item 1") Text("Item 1")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -27,7 +27,7 @@ final class ScrollViewTests: XCTestCase {
ScrollView(showsIndicators: true) { ScrollView(showsIndicators: true) {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor, customize: spy1) .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1)
#endif #endif
@ -61,13 +61,13 @@ final class ScrollViewTests: XCTestCase {
Text("Item 1") Text("Item 1")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -97,7 +97,7 @@ final class ScrollViewTests: XCTestCase {
Text("Item 1") Text("Item 1")
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -108,7 +108,7 @@ final class ScrollViewTests: XCTestCase {
ScrollView(showsIndicators: true) { ScrollView(showsIndicators: true) {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor, customize: spy1) .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1)
#endif #endif

View File

@ -23,7 +23,7 @@ final class SearchFieldTests: XCTestCase {
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), customize: spy) .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), customize: spy)
#endif #endif
} }
} }
@ -40,7 +40,7 @@ final class SearchFieldTests: XCTestCase {
Text("Customized") Text("Customized")
.searchable(text: .constant("")) .searchable(text: .constant(""))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), scope: .ancestor, customize: spy) .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), scope: .ancestor, customize: spy)
#endif #endif
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)
@ -61,11 +61,11 @@ final class SearchFieldTests: XCTestCase {
} }
.navigationViewStyle(DoubleColumnNavigationViewStyle()) .navigationViewStyle(DoubleColumnNavigationViewStyle())
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), customize: spy) .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), customize: spy)
#endif #endif
#if os(iOS) #if os(iOS)
// NB: this is necessary for introspection to work, because on iPad the search field is in the sidebar, which is initially hidden. // NB: this is necessary for introspection to work, because on iPad the search field is in the sidebar, which is initially hidden.
.introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16)) { .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) {
$0.preferredDisplayMode = .oneOverSecondary $0.preferredDisplayMode = .oneOverSecondary
} }
#endif #endif
@ -84,13 +84,13 @@ final class SearchFieldTests: XCTestCase {
Text("Customized") Text("Customized")
.searchable(text: .constant("")) .searchable(text: .constant(""))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.searchField, on: .iOS(.v15, .v16), .tvOS(.v15, .v16), scope: .ancestor, customize: spy) .introspect(.searchField, on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), scope: .ancestor, customize: spy)
#endif #endif
} }
.navigationViewStyle(DoubleColumnNavigationViewStyle()) .navigationViewStyle(DoubleColumnNavigationViewStyle())
#if os(iOS) #if os(iOS)
// NB: this is necessary for introspection to work, because on iPad the search field is in the sidebar, which is initially hidden. // NB: this is necessary for introspection to work, because on iPad the search field is in the sidebar, which is initially hidden.
.introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16)) { .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) {
$0.preferredDisplayMode = .oneOverSecondary $0.preferredDisplayMode = .oneOverSecondary
} }
#endif #endif

View File

@ -19,7 +19,7 @@ final class SliderTests: XCTestCase {
VStack { VStack {
Slider(value: .constant(0.2), in: 0...1) Slider(value: .constant(0.2), in: 0...1)
#if os(iOS) #if os(iOS)
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -27,7 +27,7 @@ final class SliderTests: XCTestCase {
Slider(value: .constant(0.5), in: 0...1) Slider(value: .constant(0.5), in: 0...1)
#if os(iOS) #if os(iOS)
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -35,7 +35,7 @@ final class SliderTests: XCTestCase {
Slider(value: .constant(0.8), in: 0...1) Slider(value: .constant(0.8), in: 0...1)
#if os(iOS) #if os(iOS)
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -19,7 +19,7 @@ final class StepperTests: XCTestCase {
VStack { VStack {
Stepper("", value: .constant(0), in: 0...10) Stepper("", value: .constant(0), in: 0...10)
#if os(iOS) #if os(iOS)
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -27,7 +27,7 @@ final class StepperTests: XCTestCase {
Stepper("", value: .constant(0), in: 0...10) Stepper("", value: .constant(0), in: 0...10)
#if os(iOS) #if os(iOS)
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -35,7 +35,7 @@ final class StepperTests: XCTestCase {
Stepper("", value: .constant(0), in: 0...10) Stepper("", value: .constant(0), in: 0...10)
#if os(iOS) #if os(iOS)
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -21,7 +21,7 @@ final class TabViewTests: XCTestCase {
} }
} }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy) .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy)
#elseif os(macOS) #elseif os(macOS)
.introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy) .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy)
#endif #endif
@ -37,7 +37,7 @@ final class TabViewTests: XCTestCase {
Color.red Color.red
Text("Something") Text("Something")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor, customize: spy) .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor, customize: spy)
#elseif os(macOS) #elseif os(macOS)
.introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy) .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy)
#endif #endif

View File

@ -25,7 +25,7 @@ final class TabViewWithPageStyleTests: XCTestCase {
} }
.tabViewStyle(.page) .tabViewStyle(.page)
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), customize: spy) .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), customize: spy)
#endif #endif
} }
} }
@ -41,7 +41,7 @@ final class TabViewWithPageStyleTests: XCTestCase {
TabView { TabView {
ZStack { Color.red; Text("1") } ZStack { Color.red; Text("1") }
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16), .tvOS(.v14, .v15, .v16), scope: .ancestor, customize: spy) .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), scope: .ancestor, customize: spy)
#endif #endif
ZStack { Color.green; Text("2") } ZStack { Color.green; Text("2") }
} }

View File

@ -24,7 +24,7 @@ final class TextEditorTests: XCTestCase {
VStack { VStack {
TextEditor(text: .constant("Text Field 0")) TextEditor(text: .constant("Text Field 0"))
#if os(iOS) #if os(iOS)
.introspect(.textEditor, on: .iOS(.v14, .v15, .v16), customize: spy0) .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -32,7 +32,7 @@ final class TextEditorTests: XCTestCase {
TextEditor(text: .constant("Text Field 1")) TextEditor(text: .constant("Text Field 1"))
#if os(iOS) #if os(iOS)
.introspect(.textEditor, on: .iOS(.v14, .v15, .v16), customize: spy1) .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -40,7 +40,7 @@ final class TextEditorTests: XCTestCase {
TextEditor(text: .constant("Text Field 2")) TextEditor(text: .constant("Text Field 2"))
#if os(iOS) #if os(iOS)
.introspect(.textEditor, on: .iOS(.v14, .v15, .v16), customize: spy2) .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -18,7 +18,7 @@ final class TextFieldTests: XCTestCase {
VStack { VStack {
TextField("", text: .constant("Text Field 0")) TextField("", text: .constant("Text Field 0"))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -26,7 +26,7 @@ final class TextFieldTests: XCTestCase {
TextField("", text: .constant("Text Field 1")) TextField("", text: .constant("Text Field 1"))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -34,7 +34,7 @@ final class TextFieldTests: XCTestCase {
TextField("", text: .constant("Text Field 2")) TextField("", text: .constant("Text Field 2"))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif
@ -61,21 +61,21 @@ final class TextFieldTests: XCTestCase {
List { List {
TextField("", text: .constant("Text Field 0")) TextField("", text: .constant("Text Field 0"))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
TextField("", text: .constant("Text Field 1")) TextField("", text: .constant("Text Field 1"))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
TextField("", text: .constant("Text Field 2")) TextField("", text: .constant("Text Field 2"))
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -19,21 +19,21 @@ final class ToggleTests: XCTestCase {
VStack { VStack {
Toggle("", isOn: .constant(true)) Toggle("", isOn: .constant(true))
#if os(iOS) #if os(iOS)
.introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
Toggle("", isOn: .constant(false)) Toggle("", isOn: .constant(false))
#if os(iOS) #if os(iOS)
.introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
Toggle("", isOn: .constant(true)) Toggle("", isOn: .constant(true))
#if os(iOS) #if os(iOS)
.introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -20,7 +20,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase {
Toggle("", isOn: .constant(true)) Toggle("", isOn: .constant(true))
.toggleStyle(.switch) .toggleStyle(.switch)
#if os(iOS) #if os(iOS)
.introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#elseif os(macOS) #elseif os(macOS)
.introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
#endif #endif
@ -28,7 +28,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase {
Toggle("", isOn: .constant(false)) Toggle("", isOn: .constant(false))
.toggleStyle(.switch) .toggleStyle(.switch)
#if os(iOS) #if os(iOS)
.introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#elseif os(macOS) #elseif os(macOS)
.introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
#endif #endif
@ -36,7 +36,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase {
Toggle("", isOn: .constant(true)) Toggle("", isOn: .constant(true))
.toggleStyle(.switch) .toggleStyle(.switch)
#if os(iOS) #if os(iOS)
.introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16), customize: spy2) .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17), customize: spy2)
#elseif os(macOS) #elseif os(macOS)
.introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
#endif #endif

View File

@ -13,7 +13,7 @@ final class ViewTests: XCTestCase {
NavigationView { NavigationView {
Text("Item 0") Text("Item 0")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.view, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy0) .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy0)
#endif #endif
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)
@ -21,7 +21,7 @@ final class ViewTests: XCTestCase {
NavigationView { NavigationView {
Text("Item 1") Text("Item 1")
#if os(iOS) || os(tvOS) #if os(iOS) || os(tvOS)
.introspect(.view, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), customize: spy1) .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), customize: spy1)
#endif #endif
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)

View File

@ -27,7 +27,7 @@ For instance, when introspecting a `ScrollView`...
ScrollView { ScrollView {
Text("Item 1") Text("Item 1")
} }
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { scrollView in .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { scrollView in
// do something with UIScrollView // do something with UIScrollView
} }
``` ```
@ -46,7 +46,7 @@ By default, `.introspect` works directly on its _receiver_. This means calling `
```swift ```swift
ScrollView { ScrollView {
Text("Item 1") Text("Item 1")
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16), scope: .ancestor) { scrollView in .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { scrollView in
// do something with UIScrollView // do something with UIScrollView
} }
} }
@ -108,7 +108,7 @@ Examples
List { List {
Text("Item") Text("Item")
} }
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16)) { tableView in .introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { tableView in
tableView.backgroundView = UIView() tableView.backgroundView = UIView()
tableView.backgroundColor = .cyan tableView.backgroundColor = .cyan
} }
@ -124,7 +124,7 @@ List {
ScrollView { ScrollView {
Text("Item") Text("Item")
} }
.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { scrollView in .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { scrollView in
scrollView.refreshControl = UIRefreshControl() scrollView.refreshControl = UIRefreshControl()
} }
``` ```
@ -136,7 +136,7 @@ NavigationView {
Text("Item") Text("Item")
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)
.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { navigationController in .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { navigationController in
navigationController.navigationBar.backgroundColor = .cyan navigationController.navigationBar.backgroundColor = .cyan
} }
``` ```
@ -145,7 +145,7 @@ NavigationView {
```swift ```swift
TextField("Text Field", text: <#Binding<String>#>) TextField("Text Field", text: <#Binding<String>#>)
.introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16), .tvOS(.v13, .v14, .v15, .v16)) { textField in .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { textField in
textField.backgroundColor = .red textField.backgroundColor = .red
} }
``` ```