Skip to content

Commit

Permalink
Support for Xcode 16.0 (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave authored Sep 19, 2024
1 parent 0d62484 commit e93bec3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
with:
submodules: recursive

- name: Configure Xcode 15
- name: Configure Xcode 16
run: |
sudo xcode-select -s /Applications/Xcode_15.4.app
sudo xcode-select -s /Applications/Xcode_16_Release_Candidate.app
- name: Run tests
run: xcodebuild test -scheme 'Compound' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=17.5' -skipPackagePluginValidation -resultBundlePath Logs/CompoundTests.xcresult
run: xcodebuild test -scheme 'Compound' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=18.0' -skipPackagePluginValidation -resultBundlePath Logs/CompoundTests.xcresult

- name: Zip artifacts
if: failure() # We only care about artefacts if the tests fail
Expand Down
2 changes: 2 additions & 0 deletions Sources/Compound/List/ListRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ public struct ListRow_Previews: PreviewProvider, PrefireProvider {
othersSection
}
.compoundList()
.frame(idealHeight: 2050) // Snapshot height
.previewLayout(.sizeThatFits)
}

static var labels: some View {
Expand Down
2 changes: 2 additions & 0 deletions Sources/Compound/List/ListRowLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -378,5 +378,7 @@ struct ListRowLabel_Previews: PreviewProvider, PrefireProvider {
}
}
.compoundList()
.frame(idealHeight: 1000) // Snapshot height
.previewLayout(.sizeThatFits)
}
}
4 changes: 2 additions & 2 deletions Tests/CompoundTests/.prefire.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
test_configuration:
- simulator_device: "iPhone14,6" # iPhone SE 3rd Generation
- required_os: 17
- required_os: 18
- template_file_path: PreviewTests.stencil
- snapshot_devices:
- iPhone 15
- iPhone 16
- iPad
2 changes: 1 addition & 1 deletion Tests/CompoundTests/PreviewTests.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class PreviewTests: XCTestCase {
private extension PreviewDevice {
func snapshotDevice() -> ViewImageConfig? {
switch rawValue {
case "iPhone 15", "iPhone 14", "iPhone 13", "iPhone 12", "iPhone 11", "iPhone 10":
case "iPhone 16", "iPhone 15", "iPhone 14", "iPhone 13", "iPhone 12", "iPhone 11", "iPhone 10":
return .iPhoneX
case "iPhone 6", "iPhone 6s", "iPhone 7", "iPhone 8":
return .iPhone8
Expand Down
2 changes: 1 addition & 1 deletion Tests/CompoundTests/__Snapshots__
Submodule __Snapshots__ updated 49 files
+ PreviewTests/test_compoundButtonStyle-iPad.1.png
+ PreviewTests/test_compoundButtonStyle-iPhone-15.1.png
+ PreviewTests/test_compoundButtonStyle-iPhone-16.1.png
+ PreviewTests/test_compoundIcon-iPad.Accessibility-Labels.png
+ PreviewTests/test_compoundIcon-iPad.Buttons.png
+ PreviewTests/test_compoundIcon-iPad.Form.png
+ PreviewTests/test_compoundIcon-iPhone-15.Accessibility-Labels.png
+ PreviewTests/test_compoundIcon-iPhone-15.Buttons.png
+ PreviewTests/test_compoundIcon-iPhone-15.Form.png
+ PreviewTests/test_compoundIcon-iPhone-16.Accessibility-Icons-Only.png
+ PreviewTests/test_compoundIcon-iPhone-16.Accessibility-Labels.png
+ PreviewTests/test_compoundIcon-iPhone-16.Buttons.png
+ PreviewTests/test_compoundIcon-iPhone-16.Form.png
+ PreviewTests/test_compoundToggleStyle-iPad.1.png
+ PreviewTests/test_compoundToggleStyle-iPhone-15.1.png
+ PreviewTests/test_compoundToggleStyle-iPhone-16.1.png
+ PreviewTests/test_listInlinePicker-iPad.1.png
+ PreviewTests/test_listInlinePicker-iPhone-15.1.png
+ PreviewTests/test_listInlinePicker-iPhone-16.1.png
+ PreviewTests/test_listRow-iPad.1.png
+ PreviewTests/test_listRow-iPhone-15.1.png
+ PreviewTests/test_listRow-iPhone-16.1.png
+ PreviewTests/test_listRowAccessory-iPad.Accessories.png
+ PreviewTests/test_listRowAccessory-iPhone-15.Accessories.png
+ PreviewTests/test_listRowAccessory-iPhone-16.Accessories.png
+ PreviewTests/test_listRowButtonStyle-iPad.1.png
+ PreviewTests/test_listRowButtonStyle-iPhone-15.1.png
+ PreviewTests/test_listRowButtonStyle-iPhone-16.1.png
+ PreviewTests/test_listRowLabel-iPad.1.png
+ PreviewTests/test_listRowLabel-iPhone-15.1.png
+ PreviewTests/test_listRowLabel-iPhone-16.1.png
+ PreviewTests/test_listRowLoadingSelection-iPad.1.png
+ PreviewTests/test_listRowLoadingSelection-iPhone-15.1.png
+ PreviewTests/test_listRowLoadingSelection-iPhone-16.1.png
+ PreviewTests/test_listRowTrailingSection-iPad.1.png
+ PreviewTests/test_listRowTrailingSection-iPhone-15.1.png
+ PreviewTests/test_listRowTrailingSection-iPhone-16.1.png
+ PreviewTests/test_listTextStyles-iPad.Form.png
+ PreviewTests/test_listTextStyles-iPad.List.png
+ PreviewTests/test_listTextStyles-iPhone-15.Form.png
+ PreviewTests/test_listTextStyles-iPhone-15.List.png
+ PreviewTests/test_listTextStyles-iPhone-16.Form.png
+ PreviewTests/test_listTextStyles-iPhone-16.List.png
+ PreviewTests/test_searchStyle-iPad.Form.png
+ PreviewTests/test_searchStyle-iPad.List.png
+ PreviewTests/test_searchStyle-iPhone-15.Form.png
+ PreviewTests/test_searchStyle-iPhone-15.List.png
+ PreviewTests/test_searchStyle-iPhone-16.Form.png
+ PreviewTests/test_searchStyle-iPhone-16.List.png

0 comments on commit e93bec3

Please sign in to comment.