christ
This commit is contained in:
38
Gaze/Constants/TestingEnvironment.swift
Normal file
38
Gaze/Constants/TestingEnvironment.swift
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// TestingEnvironment.swift
|
||||
// Gaze
|
||||
//
|
||||
// Created by OpenCode on 1/13/26.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Detects and manages testing environment states
|
||||
enum TestingEnvironment {
|
||||
/// Check if app is running in UI testing mode
|
||||
static var isUITesting: Bool {
|
||||
return ProcessInfo.processInfo.arguments.contains("--ui-testing")
|
||||
}
|
||||
|
||||
/// Check if app should skip onboarding
|
||||
static var shouldSkipOnboarding: Bool {
|
||||
return ProcessInfo.processInfo.arguments.contains("--skip-onboarding")
|
||||
}
|
||||
|
||||
/// Check if app should reset onboarding
|
||||
static var shouldResetOnboarding: Bool {
|
||||
return ProcessInfo.processInfo.arguments.contains("--reset-onboarding")
|
||||
}
|
||||
|
||||
/// Check if running in any test mode (unit tests or UI tests)
|
||||
static var isAnyTestMode: Bool {
|
||||
return isUITesting || ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
/// Check if dev triggers should be visible
|
||||
static var shouldShowDevTriggers: Bool {
|
||||
return isUITesting || isAnyTestMode
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -436,6 +436,7 @@ struct TimerStatusRowWithIndividualControls: View {
|
||||
in: .circle
|
||||
)
|
||||
.help("Trigger \(displayName) reminder now (dev)")
|
||||
.accessibilityIdentifier("trigger_\(displayName.replacingOccurrences(of: " ", with: "_"))")
|
||||
.onHover { hovering in
|
||||
isHoveredDevTrigger = hovering
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user