From 4ceb56c8e2d5ae525f2c9426f19d2f810e861ee7 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:58:16 +0100 Subject: [PATCH] wip --- Examples/Showcase/Showcase/ContentView.swift | 40 +++++++++---------- Tests/Tests/PlatformTests.swift | 39 ++++++++++++++++-- Tests/Tests/ViewTypes/ColorPickerTests.swift | 6 +-- Tests/Tests/ViewTypes/DatePickerTests.swift | 6 +-- ...DatePickerWithCompactFieldStyleTests.swift | 6 +-- .../DatePickerWithGraphicalStyleTests.swift | 6 +-- .../DatePickerWithWheelStyleTests.swift | 6 +-- Tests/Tests/ViewTypes/FormTests.swift | 4 +- Tests/Tests/ViewTypes/ListCellTests.swift | 4 +- Tests/Tests/ViewTypes/ListTests.swift | 12 +++--- .../ViewTypes/ListWithGroupedStyleTests.swift | 4 +- .../ViewTypes/ListWithPlainStyleTests.swift | 4 +- .../NavigationViewWithColumnsStyleTests.swift | 10 ++--- .../NavigationViewWithStackStyleTests.swift | 4 +- .../PickerWithSegmentedStyleTests.swift | 6 +-- .../ViewTypes/PickerWithWheelStyleTests.swift | 6 +-- .../ProgressViewWithCircularStyleTests.swift | 6 +-- .../ProgressViewWithLinearStyleTests.swift | 6 +-- Tests/Tests/ViewTypes/ScrollViewTests.swift | 12 +++--- Tests/Tests/ViewTypes/SearchFieldTests.swift | 12 +++--- Tests/Tests/ViewTypes/SliderTests.swift | 6 +-- Tests/Tests/ViewTypes/StepperTests.swift | 6 +-- Tests/Tests/ViewTypes/TabViewTests.swift | 4 +- .../ViewTypes/TabViewWithPageStyleTests.swift | 4 +- Tests/Tests/ViewTypes/TextEditorTests.swift | 6 +-- Tests/Tests/ViewTypes/TextFieldTests.swift | 12 +++--- Tests/Tests/ViewTypes/ToggleTests.swift | 6 +-- .../ToggleWithSwitchStyleTests.swift | 6 +-- Tests/Tests/ViewTypes/ViewTests.swift | 4 +- docs/SwiftUIIntrospect.md | 12 +++--- 30 files changed, 149 insertions(+), 116 deletions(-) diff --git a/Examples/Showcase/Showcase/ContentView.swift b/Examples/Showcase/Showcase/ContentView.swift index 8c47735..6d00095 100644 --- a/Examples/Showcase/Showcase/ContentView.swift +++ b/Examples/Showcase/Showcase/ContentView.swift @@ -25,7 +25,7 @@ struct ContentView: View { .tag(4) } #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 } #elseif os(macOS) @@ -62,7 +62,7 @@ struct ListShowcase: View { Text("Item 2") } #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.backgroundColor = .cyan } @@ -87,7 +87,7 @@ struct ListShowcase: View { Text("Item 1") Text("Item 2") #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.backgroundColor = .cyan } @@ -127,7 +127,7 @@ struct ScrollViewShowcase: View { .font(.system(.subheadline, design: .monospaced)) } #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 } #elseif os(macOS) @@ -145,7 +145,7 @@ struct ScrollViewShowcase: View { .padding(.horizontal, 12) .font(.system(.subheadline, design: .monospaced)) #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 } #elseif os(macOS) @@ -177,16 +177,16 @@ struct NavigationShowcase: View { #endif } #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 } - .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 } - .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 } - .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 #if os(iOS) searchBar.searchTextField.backgroundColor = .purple @@ -209,7 +209,7 @@ struct ViewControllerShowcase: View { } } .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 } } @@ -229,7 +229,7 @@ struct SimpleElementsShowcase: View { HStack { TextField("Text Field Red", text: $textFieldValue) #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 } #elseif os(macOS) @@ -241,7 +241,7 @@ struct SimpleElementsShowcase: View { TextField("Text Field Green", text: $textFieldValue) .cornerRadius(8) #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 } #elseif os(macOS) @@ -254,7 +254,7 @@ struct SimpleElementsShowcase: View { HStack { Toggle("Toggle Red", isOn: $toggleValue) #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 } #elseif os(macOS) @@ -265,7 +265,7 @@ struct SimpleElementsShowcase: View { Toggle("Toggle Green", isOn: $toggleValue) #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 } #elseif os(macOS) @@ -279,7 +279,7 @@ struct SimpleElementsShowcase: View { HStack { Slider(value: $sliderValue, in: 0...100) #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 } #elseif os(macOS) @@ -290,7 +290,7 @@ struct SimpleElementsShowcase: View { Slider(value: $sliderValue, in: 0...100) #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 } #elseif os(macOS) @@ -305,7 +305,7 @@ struct SimpleElementsShowcase: View { Text("Stepper Red") } #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 } #elseif os(macOS) @@ -318,7 +318,7 @@ struct SimpleElementsShowcase: View { Text("Stepper Green") } #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 } #elseif os(macOS) @@ -333,7 +333,7 @@ struct SimpleElementsShowcase: View { Text("DatePicker Red") } #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 } #elseif os(macOS) @@ -352,7 +352,7 @@ struct SimpleElementsShowcase: View { } .pickerStyle(SegmentedPickerStyle()) #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 } #elseif os(macOS) diff --git a/Tests/Tests/PlatformTests.swift b/Tests/Tests/PlatformTests.swift index a41c133..0c736fa 100644 --- a/Tests/Tests/PlatformTests.swift +++ b/Tests/Tests/PlatformTests.swift @@ -4,28 +4,39 @@ import XCTest final class PlatformTests: XCTestCase { func test_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.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false) } else if #available(iOS 15, *) { + XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, true) XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, false) } else if #available(iOS 14, *) { + XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, true) XCTAssertEqual(iOSVersion.v13.isCurrent, false) } else if #available(iOS 13, *) { + XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false) XCTAssertEqual(iOSVersion.v13.isCurrent, true) } #else + XCTAssertEqual(iOSVersion.v17.isCurrent, false) XCTAssertEqual(iOSVersion.v16.isCurrent, false) XCTAssertEqual(iOSVersion.v15.isCurrent, false) XCTAssertEqual(iOSVersion.v14.isCurrent, false) @@ -35,28 +46,39 @@ final class PlatformTests: XCTestCase { func test_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.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) } else if #available(macOS 12, *) { + XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, true) XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) } else if #available(macOS 11, *) { + XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, true) XCTAssertEqual(macOSVersion.v10_15.isCurrent, false) } else if #available(macOS 10.15, *) { + XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false) XCTAssertEqual(macOSVersion.v10_15.isCurrent, true) } #else + XCTAssertEqual(macOSVersion.v14.isCurrent, false) XCTAssertEqual(macOSVersion.v13.isCurrent, false) XCTAssertEqual(macOSVersion.v12.isCurrent, false) XCTAssertEqual(macOSVersion.v11.isCurrent, false) @@ -66,28 +88,39 @@ final class PlatformTests: XCTestCase { func test_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.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false) } else if #available(tvOS 15, *) { + XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, true) XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, false) } else if #available(tvOS 14, *) { + XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, true) XCTAssertEqual(tvOSVersion.v13.isCurrent, false) } else if #available(tvOS 13, *) { + XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false) XCTAssertEqual(tvOSVersion.v13.isCurrent, true) } #else + XCTAssertEqual(tvOSVersion.v17.isCurrent, false) XCTAssertEqual(tvOSVersion.v16.isCurrent, false) XCTAssertEqual(tvOSVersion.v15.isCurrent, false) XCTAssertEqual(tvOSVersion.v14.isCurrent, false) diff --git a/Tests/Tests/ViewTypes/ColorPickerTests.swift b/Tests/Tests/ViewTypes/ColorPickerTests.swift index 578ec7b..0f550a2 100644 --- a/Tests/Tests/ViewTypes/ColorPickerTests.swift +++ b/Tests/Tests/ViewTypes/ColorPickerTests.swift @@ -26,21 +26,21 @@ final class ColorPickerTests: XCTestCase { VStack { ColorPicker("", selection: .constant(PlatformColor.red.cgColor)) #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) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif ColorPicker("", selection: .constant(PlatformColor.green.cgColor)) #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) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif ColorPicker("", selection: .constant(PlatformColor.blue.cgColor)) #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) .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerTests.swift b/Tests/Tests/ViewTypes/DatePickerTests.swift index 2ddcc19..2ba7775 100644 --- a/Tests/Tests/ViewTypes/DatePickerTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerTests.swift @@ -23,7 +23,7 @@ final class DatePickerTests: XCTestCase { VStack { DatePicker("", selection: .constant(date0)) #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) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -31,7 +31,7 @@ final class DatePickerTests: XCTestCase { DatePicker("", selection: .constant(date1)) #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) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -39,7 +39,7 @@ final class DatePickerTests: XCTestCase { DatePicker("", selection: .constant(date2)) #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) .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift index ea31909..abdea4a 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift @@ -29,7 +29,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase { DatePicker("", selection: .constant(date0)) .datePickerStyle(.compact) #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) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -38,7 +38,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase { DatePicker("", selection: .constant(date1)) .datePickerStyle(.compact) #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) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -47,7 +47,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase { DatePicker("", selection: .constant(date2)) .datePickerStyle(.compact) #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) .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift index 490a7b3..415692c 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithGraphicalStyleTests.swift @@ -29,7 +29,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { DatePicker("", selection: .constant(date0)) .datePickerStyle(.graphical) #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) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -38,7 +38,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { DatePicker("", selection: .constant(date1)) .datePickerStyle(.graphical) #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) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -47,7 +47,7 @@ final class DatePickerWithGraphicalStyleTests: XCTestCase { DatePicker("", selection: .constant(date2)) .datePickerStyle(.graphical) #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) .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift index 7285072..b7d3461 100644 --- a/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/DatePickerWithWheelStyleTests.swift @@ -22,21 +22,21 @@ final class DatePickerWithWheelStyleTests: XCTestCase { DatePicker("", selection: .constant(date0)) .datePickerStyle(.wheel) #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 .cornerRadius(8) DatePicker("", selection: .constant(date1)) .datePickerStyle(.wheel) #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 .cornerRadius(8) DatePicker("", selection: .constant(date2)) .datePickerStyle(.wheel) #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 } } extraAssertions: { diff --git a/Tests/Tests/ViewTypes/FormTests.swift b/Tests/Tests/ViewTypes/FormTests.swift index c68174b..84a644e 100644 --- a/Tests/Tests/ViewTypes/FormTests.swift +++ b/Tests/Tests/ViewTypes/FormTests.swift @@ -20,14 +20,14 @@ final class FormTests: XCTestCase { Text("Item 1") } #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) } #endif Form { Text("Item 1") #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) } #endif } diff --git a/Tests/Tests/ViewTypes/ListCellTests.swift b/Tests/Tests/ViewTypes/ListCellTests.swift index 0ebbcb1..cb9b1f8 100644 --- a/Tests/Tests/ViewTypes/ListCellTests.swift +++ b/Tests/Tests/ViewTypes/ListCellTests.swift @@ -16,7 +16,7 @@ final class ListCellTests: XCTestCase { List { Text("Item 1") #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) } #elseif os(macOS) .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) } @@ -32,7 +32,7 @@ final class ListCellTests: XCTestCase { List { Text("Item 1") #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) } #elseif os(macOS) .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy($0) } diff --git a/Tests/Tests/ViewTypes/ListTests.swift b/Tests/Tests/ViewTypes/ListTests.swift index c47d4f5..642f134 100644 --- a/Tests/Tests/ViewTypes/ListTests.swift +++ b/Tests/Tests/ViewTypes/ListTests.swift @@ -19,7 +19,7 @@ final class ListTests: XCTestCase { Text("Item 1") } #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) } #elseif os(macOS) .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } @@ -28,7 +28,7 @@ final class ListTests: XCTestCase { List { Text("Item 1") #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) } #elseif os(macOS) .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") } #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) } #endif } #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) } #endif } extraAssertions: { @@ -77,7 +77,7 @@ final class ListTests: XCTestCase { Text("Item 1") } #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) } #elseif os(macOS) .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } @@ -89,7 +89,7 @@ final class ListTests: XCTestCase { List { Text("Item 1") #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) } #elseif os(macOS) .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } diff --git a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift index 5161e05..ef09afa 100644 --- a/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithGroupedStyleTests.swift @@ -19,14 +19,14 @@ final class ListWithGroupedStyleTests: XCTestCase { } .listStyle(.grouped) #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) } #endif List { Text("Item 1") #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) } #endif } diff --git a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift index ad8f400..0c783cf 100644 --- a/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift +++ b/Tests/Tests/ViewTypes/ListWithPlainStyleTests.swift @@ -20,7 +20,7 @@ final class ListWithPlainStyleTests: XCTestCase { } .listStyle(.plain) #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) } #elseif os(macOS) .introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { spy0($0) } @@ -29,7 +29,7 @@ final class ListWithPlainStyleTests: XCTestCase { List { Text("Item 1") #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) } #elseif os(macOS) .introspect(.list(style: .plain), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { spy1($0) } diff --git a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift index 4913afb..b40ac5d 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithColumnsStyleTests.swift @@ -23,9 +23,9 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { } .navigationViewStyle(DoubleColumnNavigationViewStyle()) #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) - .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) .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy) #endif @@ -41,9 +41,9 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { Color.red Text("Something") #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) - .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) .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy) #endif @@ -52,7 +52,7 @@ final class NavigationViewWithColumnsStyleTests: XCTestCase { .navigationViewStyle(DoubleColumnNavigationViewStyle()) #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. - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16)) { + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { $0.preferredDisplayMode = .oneOverSecondary } #endif diff --git a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift index 6e89763..51635d8 100644 --- a/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift +++ b/Tests/Tests/ViewTypes/NavigationViewWithStackStyleTests.swift @@ -20,7 +20,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase { } .navigationViewStyle(.stack) #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 } } @@ -34,7 +34,7 @@ final class NavigationViewWithStackStyleTests: XCTestCase { Color.red Text("Something") #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 } } diff --git a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift index e5eb912..903ab89 100644 --- a/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithSegmentedStyleTests.swift @@ -21,7 +21,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase { } .pickerStyle(.segmented) #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) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -33,7 +33,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase { } .pickerStyle(.segmented) #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) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -46,7 +46,7 @@ final class PickerWithSegmentedStyleTests: XCTestCase { } .pickerStyle(.segmented) #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) .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift index 5915c6f..4efdd61 100644 --- a/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift +++ b/Tests/Tests/ViewTypes/PickerWithWheelStyleTests.swift @@ -20,7 +20,7 @@ final class PickerWithWheelStyleTests: XCTestCase { } .pickerStyle(.wheel) #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 .cornerRadius(8) @@ -30,7 +30,7 @@ final class PickerWithWheelStyleTests: XCTestCase { } .pickerStyle(.wheel) #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 .cornerRadius(8) @@ -41,7 +41,7 @@ final class PickerWithWheelStyleTests: XCTestCase { } .pickerStyle(.wheel) #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 } } extraAssertions: { diff --git a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift index 86de634..b5d58ba 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithCircularStyleTests.swift @@ -23,7 +23,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { ProgressView(value: 0.25) .progressViewStyle(.circular) #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) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif @@ -31,7 +31,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { ProgressView(value: 0.5) .progressViewStyle(.circular) #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) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif @@ -39,7 +39,7 @@ final class ProgressViewWithCircularStyleTests: XCTestCase { ProgressView(value: 0.75) .progressViewStyle(.circular) #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) .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift index 2676139..b1751ef 100644 --- a/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift +++ b/Tests/Tests/ViewTypes/ProgressViewWithLinearStyleTests.swift @@ -23,7 +23,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { ProgressView(value: 0.25) .progressViewStyle(.linear) #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) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif @@ -31,7 +31,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { ProgressView(value: 0.5) .progressViewStyle(.linear) #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) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif @@ -39,7 +39,7 @@ final class ProgressViewWithLinearStyleTests: XCTestCase { ProgressView(value: 0.75) .progressViewStyle(.linear) #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) .introspect(.progressView(style: .linear), on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ScrollViewTests.swift b/Tests/Tests/ViewTypes/ScrollViewTests.swift index b1587c3..5170c42 100644 --- a/Tests/Tests/ViewTypes/ScrollViewTests.swift +++ b/Tests/Tests/ViewTypes/ScrollViewTests.swift @@ -19,7 +19,7 @@ final class ScrollViewTests: XCTestCase { Text("Item 1") } #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) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -27,7 +27,7 @@ final class ScrollViewTests: XCTestCase { ScrollView(showsIndicators: true) { Text("Item 1") #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) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1) #endif @@ -61,13 +61,13 @@ final class ScrollViewTests: XCTestCase { Text("Item 1") } #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) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif } #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) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -97,7 +97,7 @@ final class ScrollViewTests: XCTestCase { Text("Item 1") } #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) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -108,7 +108,7 @@ final class ScrollViewTests: XCTestCase { ScrollView(showsIndicators: true) { Text("Item 1") #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) .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy1) #endif diff --git a/Tests/Tests/ViewTypes/SearchFieldTests.swift b/Tests/Tests/ViewTypes/SearchFieldTests.swift index b188356..334e1cf 100644 --- a/Tests/Tests/ViewTypes/SearchFieldTests.swift +++ b/Tests/Tests/ViewTypes/SearchFieldTests.swift @@ -23,7 +23,7 @@ final class SearchFieldTests: XCTestCase { } .navigationViewStyle(.stack) #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 } } @@ -40,7 +40,7 @@ final class SearchFieldTests: XCTestCase { Text("Customized") .searchable(text: .constant("")) #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 } .navigationViewStyle(.stack) @@ -61,11 +61,11 @@ final class SearchFieldTests: XCTestCase { } .navigationViewStyle(DoubleColumnNavigationViewStyle()) #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 #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. - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16)) { + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { $0.preferredDisplayMode = .oneOverSecondary } #endif @@ -84,13 +84,13 @@ final class SearchFieldTests: XCTestCase { Text("Customized") .searchable(text: .constant("")) #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 } .navigationViewStyle(DoubleColumnNavigationViewStyle()) #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. - .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16)) { + .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { $0.preferredDisplayMode = .oneOverSecondary } #endif diff --git a/Tests/Tests/ViewTypes/SliderTests.swift b/Tests/Tests/ViewTypes/SliderTests.swift index 368aff4..7c85709 100644 --- a/Tests/Tests/ViewTypes/SliderTests.swift +++ b/Tests/Tests/ViewTypes/SliderTests.swift @@ -19,7 +19,7 @@ final class SliderTests: XCTestCase { VStack { Slider(value: .constant(0.2), in: 0...1) #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) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -27,7 +27,7 @@ final class SliderTests: XCTestCase { Slider(value: .constant(0.5), in: 0...1) #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) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -35,7 +35,7 @@ final class SliderTests: XCTestCase { Slider(value: .constant(0.8), in: 0...1) #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) .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/StepperTests.swift b/Tests/Tests/ViewTypes/StepperTests.swift index ff2f330..af5436f 100644 --- a/Tests/Tests/ViewTypes/StepperTests.swift +++ b/Tests/Tests/ViewTypes/StepperTests.swift @@ -19,7 +19,7 @@ final class StepperTests: XCTestCase { VStack { Stepper("", value: .constant(0), in: 0...10) #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) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -27,7 +27,7 @@ final class StepperTests: XCTestCase { Stepper("", value: .constant(0), in: 0...10) #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) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -35,7 +35,7 @@ final class StepperTests: XCTestCase { Stepper("", value: .constant(0), in: 0...10) #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) .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/TabViewTests.swift b/Tests/Tests/ViewTypes/TabViewTests.swift index 866fb1d..0185197 100644 --- a/Tests/Tests/ViewTypes/TabViewTests.swift +++ b/Tests/Tests/ViewTypes/TabViewTests.swift @@ -21,7 +21,7 @@ final class TabViewTests: XCTestCase { } } #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) .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy) #endif @@ -37,7 +37,7 @@ final class TabViewTests: XCTestCase { Color.red Text("Something") #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) .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor, customize: spy) #endif diff --git a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift index 51ac089..eac652c 100644 --- a/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift +++ b/Tests/Tests/ViewTypes/TabViewWithPageStyleTests.swift @@ -25,7 +25,7 @@ final class TabViewWithPageStyleTests: XCTestCase { } .tabViewStyle(.page) #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 } } @@ -41,7 +41,7 @@ final class TabViewWithPageStyleTests: XCTestCase { TabView { ZStack { Color.red; Text("1") } #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 ZStack { Color.green; Text("2") } } diff --git a/Tests/Tests/ViewTypes/TextEditorTests.swift b/Tests/Tests/ViewTypes/TextEditorTests.swift index 42d9dc9..91243fc 100644 --- a/Tests/Tests/ViewTypes/TextEditorTests.swift +++ b/Tests/Tests/ViewTypes/TextEditorTests.swift @@ -24,7 +24,7 @@ final class TextEditorTests: XCTestCase { VStack { TextEditor(text: .constant("Text Field 0")) #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) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0) #endif @@ -32,7 +32,7 @@ final class TextEditorTests: XCTestCase { TextEditor(text: .constant("Text Field 1")) #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) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1) #endif @@ -40,7 +40,7 @@ final class TextEditorTests: XCTestCase { TextEditor(text: .constant("Text Field 2")) #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) .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/TextFieldTests.swift b/Tests/Tests/ViewTypes/TextFieldTests.swift index 5b6531e..b68ce7e 100644 --- a/Tests/Tests/ViewTypes/TextFieldTests.swift +++ b/Tests/Tests/ViewTypes/TextFieldTests.swift @@ -18,7 +18,7 @@ final class TextFieldTests: XCTestCase { VStack { TextField("", text: .constant("Text Field 0")) #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) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -26,7 +26,7 @@ final class TextFieldTests: XCTestCase { TextField("", text: .constant("Text Field 1")) #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) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -34,7 +34,7 @@ final class TextFieldTests: XCTestCase { TextField("", text: .constant("Text Field 2")) #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) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif @@ -61,21 +61,21 @@ final class TextFieldTests: XCTestCase { List { TextField("", text: .constant("Text Field 0")) #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) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif TextField("", text: .constant("Text Field 1")) #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) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif TextField("", text: .constant("Text Field 2")) #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) .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ToggleTests.swift b/Tests/Tests/ViewTypes/ToggleTests.swift index 28e7606..9278124 100644 --- a/Tests/Tests/ViewTypes/ToggleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleTests.swift @@ -19,21 +19,21 @@ final class ToggleTests: XCTestCase { VStack { Toggle("", isOn: .constant(true)) #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) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif Toggle("", isOn: .constant(false)) #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) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif Toggle("", isOn: .constant(true)) #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) .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift index d0b0039..f27b351 100644 --- a/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift +++ b/Tests/Tests/ViewTypes/ToggleWithSwitchStyleTests.swift @@ -20,7 +20,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase { Toggle("", isOn: .constant(true)) .toggleStyle(.switch) #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) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0) #endif @@ -28,7 +28,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase { Toggle("", isOn: .constant(false)) .toggleStyle(.switch) #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) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1) #endif @@ -36,7 +36,7 @@ final class ToggleWithSwitchStyleTests: XCTestCase { Toggle("", isOn: .constant(true)) .toggleStyle(.switch) #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) .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2) #endif diff --git a/Tests/Tests/ViewTypes/ViewTests.swift b/Tests/Tests/ViewTypes/ViewTests.swift index 4cf9a3a..133029b 100644 --- a/Tests/Tests/ViewTypes/ViewTests.swift +++ b/Tests/Tests/ViewTypes/ViewTests.swift @@ -13,7 +13,7 @@ final class ViewTests: XCTestCase { NavigationView { Text("Item 0") #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 } .navigationViewStyle(.stack) @@ -21,7 +21,7 @@ final class ViewTests: XCTestCase { NavigationView { Text("Item 1") #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 } .navigationViewStyle(.stack) diff --git a/docs/SwiftUIIntrospect.md b/docs/SwiftUIIntrospect.md index d7fe1ac..fd87e48 100644 --- a/docs/SwiftUIIntrospect.md +++ b/docs/SwiftUIIntrospect.md @@ -27,7 +27,7 @@ For instance, when introspecting a `ScrollView`... ScrollView { 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 } ``` @@ -46,7 +46,7 @@ By default, `.introspect` works directly on its _receiver_. This means calling ` ```swift ScrollView { 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 } } @@ -108,7 +108,7 @@ Examples List { 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.backgroundColor = .cyan } @@ -124,7 +124,7 @@ List { ScrollView { 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() } ``` @@ -136,7 +136,7 @@ NavigationView { Text("Item") } .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 } ``` @@ -145,7 +145,7 @@ NavigationView { ```swift TextField("Text Field", text: <#Binding#>) - .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 } ```