mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Automatic Accessibility Audits on previews part 1 (#4322)
* setup target * accessibility tests implementation * removed ipad check * pr improvements * updated project
This commit is contained in:
@@ -33,10 +33,18 @@ extension ProcessInfo {
|
||||
false
|
||||
#endif
|
||||
}
|
||||
|
||||
static var isRunningAccessibilityTests: Bool {
|
||||
#if DEBUG
|
||||
processInfo.environment["ACCESSIBILITY_VIEW"] != nil
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Flag indicating whether the app is running the UI tests or unit tests.
|
||||
static var isRunningTests: Bool {
|
||||
isRunningUITests || isRunningUnitTests || isRunningIntegrationTests
|
||||
isRunningUITests || isRunningUnitTests || isRunningIntegrationTests || isRunningAccessibilityTests
|
||||
}
|
||||
|
||||
/// The identifier of the screen to be loaded when running UI tests.
|
||||
@@ -48,6 +56,15 @@ extension ProcessInfo {
|
||||
#endif
|
||||
}
|
||||
|
||||
/// The identifier of the preview that will be accessibility tested
|
||||
static var accessibilityViewID: String? {
|
||||
#if DEBUG
|
||||
processInfo.environment["ACCESSIBILITY_VIEW"]
|
||||
#else
|
||||
nil
|
||||
#endif
|
||||
}
|
||||
|
||||
static var shouldDisableTimelineAccessibility: Bool {
|
||||
guard isRunningUITests else {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user