mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
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:
@@ -10,7 +10,7 @@ jobs:
|
|||||||
tests:
|
tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
runs-on: macos-15
|
runs-on: macos-15
|
||||||
timeout-minutes: 120
|
timeout-minutes: 150
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||||
|
|||||||
@@ -24,19 +24,9 @@ enum Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static func checkEnvironments() {
|
private static func checkEnvironments() {
|
||||||
let requirediPhoneSimulator = "iPhone17,3" // iPhone 16
|
guard UIDevice.current.userInterfaceIdiom == .phone else {
|
||||||
let requiredOSVersion = 18
|
XCTFail("Accessibility tests should be run on a phone.")
|
||||||
|
fatalError("Accessibility tests should be run on a phone.")
|
||||||
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)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ struct PreviewsWrapperView: View {
|
|||||||
EmptyView()
|
EmptyView()
|
||||||
} else {
|
} else {
|
||||||
wrapper.currentPreview.content
|
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)")
|
.id("\(wrapper.previewName)-\(dynamicTypeSize)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -95,7 +95,7 @@ lane :accessibility_tests do |options|
|
|||||||
|
|
||||||
run_tests(
|
run_tests(
|
||||||
scheme: "AccessibilityTests",
|
scheme: "AccessibilityTests",
|
||||||
device: "iPhone 17 (#{simulator_version})",
|
device: "iPhone 16 (18.5)", # The tests are randomly crashing on iOS 26
|
||||||
ensure_devices_found: true,
|
ensure_devices_found: true,
|
||||||
prelaunch_simulator: false,
|
prelaunch_simulator: false,
|
||||||
result_bundle: true,
|
result_bundle: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user