wip
This commit is contained in:
parent
de4f8692eb
commit
4ceb56c8e2
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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) }
|
||||
|
|
|
@ -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) }
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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) }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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") }
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<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
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue