diff --git a/.github/workflows/accessibility_tests.yml b/.github/workflows/accessibility_tests.yml index 668bd0e4f..b247f1645 100644 --- a/.github/workflows/accessibility_tests.yml +++ b/.github/workflows/accessibility_tests.yml @@ -10,7 +10,7 @@ jobs: tests: name: Tests runs-on: macos-15 - timeout-minutes: 120 + timeout-minutes: 150 concurrency: # Only allow a single run of this workflow on each branch, automatically cancelling older runs. diff --git a/AccessibilityTests/Sources/Application.swift b/AccessibilityTests/Sources/Application.swift index 9ef602907..815926372 100644 --- a/AccessibilityTests/Sources/Application.swift +++ b/AccessibilityTests/Sources/Application.swift @@ -24,19 +24,9 @@ enum Application { } private static func checkEnvironments() { - let requirediPhoneSimulator = "iPhone17,3" // iPhone 16 - let requiredOSVersion = 18 - - let osVersion = ProcessInfo().operatingSystemVersion - guard osVersion.majorVersion == requiredOSVersion else { - fatalError("Switch to iOS \(requiredOSVersion) for these tests.") - } - - guard let deviceModel = ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] else { - fatalError("Unknown simulator.") - } - guard deviceModel == requirediPhoneSimulator else { - fatalError("Running on \(deviceModel) but we only support \(requirediPhoneSimulator)") + guard UIDevice.current.userInterfaceIdiom == .phone else { + XCTFail("Accessibility tests should be run on a phone.") + fatalError("Accessibility tests should be run on a phone.") } } } diff --git a/ElementX/Sources/AccessibilityTests/AccessibilityTestsAppCoordinator.swift b/ElementX/Sources/AccessibilityTests/AccessibilityTestsAppCoordinator.swift index 175e57e74..0793360ff 100644 --- a/ElementX/Sources/AccessibilityTests/AccessibilityTestsAppCoordinator.swift +++ b/ElementX/Sources/AccessibilityTests/AccessibilityTestsAppCoordinator.swift @@ -108,6 +108,7 @@ struct PreviewsWrapperView: View { EmptyView() } else { wrapper.currentPreview.content + // This ID raises UIKit assertions on iOS 26 but is needed otherwise toolbars go missing and some timeline items won't resize. .id("\(wrapper.previewName)-\(dynamicTypeSize)") } } diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d42e134d9..05a176611 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -95,7 +95,7 @@ lane :accessibility_tests do |options| run_tests( scheme: "AccessibilityTests", - device: "iPhone 17 (#{simulator_version})", + device: "iPhone 16 (18.5)", # The tests are randomly crashing on iOS 26 ensure_devices_found: true, prelaunch_simulator: false, result_bundle: true,