Don't assert specific devices for accessibility tests and use iOS 18 again. (#4741)

* Don't assert specific devices for accessibility tests.

It's not as critical as UI/Preview tests as nothing is snapshotted.

* Extend the timeout for accessibility tests.

They're slow 😅

* Drop back to iOS 18.5 for accessibility tests (for now).
This commit is contained in:
Doug
2025-11-13 10:34:36 +00:00
committed by GitHub
parent 517e6036c9
commit eda1e844d2
4 changed files with 6 additions and 15 deletions

View File

@@ -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.

View File

@@ -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.")
}
}
}

View File

@@ -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)")
}
}

View File

@@ -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,