Skip to content

Commit 4cea34c

Browse files
authored
Infra: run tests on macOS 15 (#457)
1 parent 27a0bb9 commit 4cea34c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+158
-146
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ jobs:
107107
runtime: macOS 14
108108
os: macos-14
109109
xcode: 15.4
110+
- platform: [macOS, 15]
111+
runtime: macOS 15
112+
os: macos-15
113+
xcode: 16.2
110114

111115
- platform: [visionOS, 1]
112116
runtime: visionOS 1.2

.spi.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ version: 1
22
builder:
33
configs:
44
- documentation_targets: [SwiftUIIntrospect]
5-
custom_documentation_parameters: [--include-extended-types]

Examples/Showcase/Showcase/AppView.swift

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct AppView: View {
1212
window.backgroundColor = .brown
1313
}
1414
#elseif os(macOS)
15-
.introspect(.window, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { window in
15+
.introspect(.window, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { window in
1616
window.backgroundColor = .lightGray
1717
}
1818
#endif
@@ -92,7 +92,7 @@ struct ListShowcase: View {
9292
collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan
9393
}
9494
#elseif os(macOS)
95-
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { tableView in
95+
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { tableView in
9696
tableView.backgroundColor = .cyan
9797
}
9898
#endif
@@ -117,7 +117,7 @@ struct ListShowcase: View {
117117
collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan
118118
}
119119
#elseif os(macOS)
120-
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { tableView in
120+
.introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), scope: .ancestor) { tableView in
121121
tableView.backgroundColor = .cyan
122122
}
123123
#endif
@@ -155,7 +155,7 @@ struct ScrollViewShowcase: View {
155155
scrollView.layer.backgroundColor = UIColor.cyan.cgColor
156156
}
157157
#elseif os(macOS)
158-
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { scrollView in
158+
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { scrollView in
159159
scrollView.drawsBackground = true
160160
scrollView.backgroundColor = .cyan
161161
}
@@ -177,7 +177,7 @@ struct ScrollViewShowcase: View {
177177
scrollView.layer.backgroundColor = UIColor.cyan.cgColor
178178
}
179179
#elseif os(macOS)
180-
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), scope: .ancestor) { scrollView in
180+
.introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), scope: .ancestor) { scrollView in
181181
scrollView.drawsBackground = true
182182
scrollView.backgroundColor = .cyan
183183
}
@@ -310,7 +310,7 @@ struct GenericViewShowcase: View {
310310
view.backgroundColor = .cyan
311311
}
312312
#elseif os(macOS)
313-
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { view in
313+
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { view in
314314
view.layer?.backgroundColor = NSColor.cyan.cgColor
315315
}
316316
#endif
@@ -322,11 +322,11 @@ struct GenericViewShowcase: View {
322322
.view,
323323
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2)
324324
) { view in
325-
view.backgroundColor = .lightGray
325+
view.backgroundColor = .yellow
326326
}
327327
#elseif os(macOS)
328-
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { view in
329-
view.layer?.backgroundColor = NSColor.lightGray.cgColor
328+
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { view in
329+
view.layer?.backgroundColor = NSColor.yellow.cgColor
330330
}
331331
#endif
332332

@@ -339,7 +339,7 @@ struct GenericViewShowcase: View {
339339
view.backgroundColor = .blue
340340
}
341341
#elseif os(macOS)
342-
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { view in
342+
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { view in
343343
view.layer?.backgroundColor = NSColor.blue.cgColor
344344
}
345345
#endif
@@ -353,7 +353,7 @@ struct GenericViewShowcase: View {
353353
view.backgroundColor = .red
354354
}
355355
#elseif os(macOS)
356-
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { view in
356+
.introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { view in
357357
view.layer?.backgroundColor = NSColor.red.cgColor
358358
}
359359
#endif
@@ -380,7 +380,7 @@ struct SimpleElementsShowcase: View {
380380
textField.backgroundColor = .red
381381
}
382382
#elseif os(macOS)
383-
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { textField in
383+
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { textField in
384384
textField.backgroundColor = .red
385385
}
386386
#endif
@@ -395,7 +395,7 @@ struct SimpleElementsShowcase: View {
395395
textField.backgroundColor = .green
396396
}
397397
#elseif os(macOS)
398-
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { textField in
398+
.introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { textField in
399399
textField.backgroundColor = .green
400400
}
401401
#endif
@@ -413,7 +413,7 @@ struct SimpleElementsShowcase: View {
413413
toggle.backgroundColor = .red
414414
}
415415
#elseif os(macOS)
416-
.introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { toggle in
416+
.introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { toggle in
417417
toggle.layer?.backgroundColor = NSColor.red.cgColor
418418
}
419419
#endif
@@ -427,7 +427,7 @@ struct SimpleElementsShowcase: View {
427427
toggle.backgroundColor = .green
428428
}
429429
#elseif os(macOS)
430-
.introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { toggle in
430+
.introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { toggle in
431431
toggle.layer?.backgroundColor = NSColor.green.cgColor
432432
}
433433
#endif
@@ -440,7 +440,7 @@ struct SimpleElementsShowcase: View {
440440
slider.backgroundColor = .red
441441
}
442442
#elseif os(macOS)
443-
.introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { slider in
443+
.introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { slider in
444444
slider.layer?.backgroundColor = NSColor.red.cgColor
445445
}
446446
#endif
@@ -451,7 +451,7 @@ struct SimpleElementsShowcase: View {
451451
slider.backgroundColor = .green
452452
}
453453
#elseif os(macOS)
454-
.introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { slider in
454+
.introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { slider in
455455
slider.layer?.backgroundColor = NSColor.green.cgColor
456456
}
457457
#endif
@@ -466,7 +466,7 @@ struct SimpleElementsShowcase: View {
466466
stepper.backgroundColor = .red
467467
}
468468
#elseif os(macOS)
469-
.introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { stepper in
469+
.introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { stepper in
470470
stepper.layer?.backgroundColor = NSColor.red.cgColor
471471
}
472472
#endif
@@ -479,7 +479,7 @@ struct SimpleElementsShowcase: View {
479479
stepper.backgroundColor = .green
480480
}
481481
#elseif os(macOS)
482-
.introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { stepper in
482+
.introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { stepper in
483483
stepper.layer?.backgroundColor = NSColor.green.cgColor
484484
}
485485
#endif
@@ -495,7 +495,7 @@ struct SimpleElementsShowcase: View {
495495
datePicker.backgroundColor = .red
496496
}
497497
#elseif os(macOS)
498-
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { datePicker in
498+
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { datePicker in
499499
datePicker.layer?.backgroundColor = NSColor.red.cgColor
500500
}
501501
#endif
@@ -517,7 +517,7 @@ struct SimpleElementsShowcase: View {
517517
datePicker.backgroundColor = .red
518518
}
519519
#elseif os(macOS)
520-
.introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { datePicker in
520+
.introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { datePicker in
521521
datePicker.layer?.backgroundColor = NSColor.red.cgColor
522522
}
523523
#endif

Sources/ViewTypes/DatePickerWithCompactStyle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extension IntrospectableViewType where Self == DatePickerWithCompactStyleType {
6868
#if canImport(UIKit)
6969
extension iOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
7070
@available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on iOS 13")
71-
public static let v13 = Self(for: .v13)
71+
public static let v13 = Self.unavailable()
7272
public static let v14 = Self(for: .v14)
7373
public static let v15 = Self(for: .v15)
7474
public static let v16 = Self(for: .v16)
@@ -83,7 +83,7 @@ extension visionOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
8383
#elseif canImport(AppKit) && !targetEnvironment(macCatalyst)
8484
extension macOSViewVersion<DatePickerWithCompactStyleType, NSDatePicker> {
8585
@available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on macOS 10.15")
86-
public static let v10_15 = Self(for: .v10_15)
86+
public static let v10_15 = Self.unavailable()
8787
public static let v10_15_4 = Self(for: .v10_15_4)
8888
public static let v11 = Self(for: .v11)
8989
public static let v12 = Self(for: .v12)

Sources/ViewTypes/SignInWithAppleButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import SwiftUI
4747
/// } onCompletion: { result in
4848
/// // do something with result
4949
/// }
50-
/// .introspect(.signInWithAppleButton, on: .macOS(.v11, .v12, .v13, .v14),) {
50+
/// .introspect(.signInWithAppleButton, on: .macOS(.v11, .v12, .v13, .v14, .v15),) {
5151
/// print(type(of: $0)) // ASAuthorizationAppleIDButton
5252
/// }
5353
/// }

Sources/ViewTypes/TabView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import SwiftUI
4444
/// Text("Tab 1").tabItem { Text("Tab 1") }
4545
/// Text("Tab 2").tabItem { Text("Tab 2") }
4646
/// }
47-
/// .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) {
47+
/// .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) {
4848
/// print(type(of: $0)) // NSTabView
4949
/// }
5050
/// }
@@ -96,7 +96,8 @@ extension macOSViewVersion<TabViewType, NSTabView> {
9696
public static let v12 = Self(for: .v12)
9797
public static let v13 = Self(for: .v13)
9898
public static let v14 = Self(for: .v14)
99-
public static let v15 = Self(for: .v15)
99+
@available(*, unavailable, message: "TabView is no longer backed by NSTabView starting macOS 15")
100+
public static let v15 = Self.unavailable()
100101
}
101102
#endif
102103
#endif

Tests/Tests/ViewTypes/ButtonTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ final class ButtonTests: XCTestCase {
2020
Button("Button 0", action: {})
2121
.buttonStyle(.bordered)
2222
#if os(macOS)
23-
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
23+
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), customize: spy0)
2424
#endif
2525

2626
Button("Button 1", action: {})
2727
.buttonStyle(.borderless)
2828
#if os(macOS)
29-
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
29+
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), customize: spy1)
3030
#endif
3131

3232
Button("Button 2", action: {})
3333
.buttonStyle(.link)
3434
#if os(macOS)
35-
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
35+
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), customize: spy2)
3636
#endif
3737

3838
Button("Button 3", action: {})
3939
#if os(macOS)
40-
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy3)
40+
.introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), customize: spy3)
4141
#endif
4242
}
4343
} extraAssertions: {

Tests/Tests/ViewTypes/ColorPickerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ final class ColorPickerTests: XCTestCase {
2929
#if os(iOS) || os(visionOS)
3030
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy0)
3131
#elseif os(macOS)
32-
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0)
32+
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14, .v15), customize: spy0)
3333
#endif
3434

3535
ColorPicker("", selection: .constant(PlatformColor.green.cgColor))
3636
#if os(iOS) || os(visionOS)
3737
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy1)
3838
#elseif os(macOS)
39-
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1)
39+
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14, .v15), customize: spy1)
4040
#endif
4141

4242
ColorPicker("", selection: .constant(PlatformColor.blue.cgColor))
4343
#if os(iOS) || os(visionOS)
4444
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy2)
4545
#elseif os(macOS)
46-
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2)
46+
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14, .v15), customize: spy2)
4747
#endif
4848
}
4949
} extraAssertions: {

Tests/Tests/ViewTypes/DatePickerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ final class DatePickerTests: XCTestCase {
2626
#if os(iOS) || os(visionOS)
2727
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy0)
2828
#elseif os(macOS)
29-
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
29+
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), customize: spy0)
3030
#endif
3131
.cornerRadius(8)
3232

3333
DatePicker("", selection: .constant(date1))
3434
#if os(iOS) || os(visionOS)
3535
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy1)
3636
#elseif os(macOS)
37-
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
37+
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), customize: spy1)
3838
#endif
3939
.cornerRadius(8)
4040

4141
DatePicker("", selection: .constant(date2))
4242
#if os(iOS) || os(visionOS)
4343
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy2)
4444
#elseif os(macOS)
45-
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
45+
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15), customize: spy2)
4646
#endif
4747
}
4848
} extraAssertions: {

Tests/Tests/ViewTypes/DatePickerWithCompactFieldStyleTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase {
3232
#if os(iOS) || os(visionOS)
3333
.introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy0)
3434
#elseif os(macOS)
35-
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy0)
35+
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14, .v15), customize: spy0)
3636
#endif
3737
.cornerRadius(8)
3838

@@ -41,7 +41,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase {
4141
#if os(iOS) || os(visionOS)
4242
.introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy1)
4343
#elseif os(macOS)
44-
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy1)
44+
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14, .v15), customize: spy1)
4545
#endif
4646
.cornerRadius(8)
4747

@@ -50,7 +50,7 @@ final class DatePickerWithCompactStyleTests: XCTestCase {
5050
#if os(iOS) || os(visionOS)
5151
.introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1, .v2), customize: spy2)
5252
#elseif os(macOS)
53-
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14), customize: spy2)
53+
.introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14, .v15), customize: spy2)
5454
#endif
5555
}
5656
} extraAssertions: {

0 commit comments

Comments
 (0)