diff --git a/ElementX/Sources/Other/Tests.swift b/ElementX/Sources/Other/Tests.swift index a87d20a0e..3bf55a812 100644 --- a/ElementX/Sources/Other/Tests.swift +++ b/ElementX/Sources/Other/Tests.swift @@ -29,7 +29,7 @@ public enum Tests { /// Flag indicating whether the app is running the UI tests. static var isRunningUITests: Bool { #if DEBUG - ProcessInfo.processInfo.environment["IS_RUNNING_UI_TESTS"] == "1" + ProcessInfo.processInfo.environment["UI_TESTS_SCREEN"] != nil #else false #endif diff --git a/ElementX/SupportingFiles/target.yml b/ElementX/SupportingFiles/target.yml index 48f5a584a..27455dc4f 100644 --- a/ElementX/SupportingFiles/target.yml +++ b/ElementX/SupportingFiles/target.yml @@ -25,6 +25,9 @@ schemes: - variable: HTTPS_PROXY value: 192.168.0.111:9090 isEnabled: false + - variable: UI_TESTS_SCREEN + value: "" + isEnabled: false test: config: Debug gatherCoverageData: true diff --git a/UITests/Sources/Application.swift b/UITests/Sources/Application.swift index 503da5844..8f80851d9 100644 --- a/UITests/Sources/Application.swift +++ b/UITests/Sources/Application.swift @@ -21,7 +21,6 @@ struct Application { static func launch(_ identifier: UITestsScreenIdentifier) -> XCUIApplication { let app = XCUIApplication() app.launchEnvironment = [ - "IS_RUNNING_UI_TESTS": "1", "UI_TESTS_SCREEN": identifier.rawValue ]