From e93bec3b74d92d192523f636a5c78ccb0beb1bd2 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:06:52 +0100 Subject: [PATCH] Support for Xcode 16.0 (#106) --- .github/workflows/tests.yml | 6 +++--- Sources/Compound/List/ListRow.swift | 2 ++ Sources/Compound/List/ListRowLabel.swift | 2 ++ Tests/CompoundTests/.prefire.yml | 4 ++-- Tests/CompoundTests/PreviewTests.stencil | 2 +- Tests/CompoundTests/__Snapshots__ | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8e063ab..0696849 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/Sources/Compound/List/ListRow.swift b/Sources/Compound/List/ListRow.swift index 734571a..86431fd 100644 --- a/Sources/Compound/List/ListRow.swift +++ b/Sources/Compound/List/ListRow.swift @@ -270,6 +270,8 @@ public struct ListRow_Previews: PreviewProvider, PrefireProvider { othersSection } .compoundList() + .frame(idealHeight: 2050) // Snapshot height + .previewLayout(.sizeThatFits) } static var labels: some View { diff --git a/Sources/Compound/List/ListRowLabel.swift b/Sources/Compound/List/ListRowLabel.swift index a2a4711..7cffb74 100644 --- a/Sources/Compound/List/ListRowLabel.swift +++ b/Sources/Compound/List/ListRowLabel.swift @@ -378,5 +378,7 @@ struct ListRowLabel_Previews: PreviewProvider, PrefireProvider { } } .compoundList() + .frame(idealHeight: 1000) // Snapshot height + .previewLayout(.sizeThatFits) } } diff --git a/Tests/CompoundTests/.prefire.yml b/Tests/CompoundTests/.prefire.yml index 0d33eec..fc9d864 100644 --- a/Tests/CompoundTests/.prefire.yml +++ b/Tests/CompoundTests/.prefire.yml @@ -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 diff --git a/Tests/CompoundTests/PreviewTests.stencil b/Tests/CompoundTests/PreviewTests.stencil index 9f19383..42e6aaf 100644 --- a/Tests/CompoundTests/PreviewTests.stencil +++ b/Tests/CompoundTests/PreviewTests.stencil @@ -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 diff --git a/Tests/CompoundTests/__Snapshots__ b/Tests/CompoundTests/__Snapshots__ index b180788..0db6b30 160000 --- a/Tests/CompoundTests/__Snapshots__ +++ b/Tests/CompoundTests/__Snapshots__ @@ -1 +1 @@ -Subproject commit b180788e17a2c0a3a34fd9a5837279931159783a +Subproject commit 0db6b30edba9c5c96484c4f3178e7e0d2f4bb43e