From 27729bf8a7dfea3ac4c108073c5bca7efef87dfd Mon Sep 17 00:00:00 2001 From: Lars <134181853+bo2themax@users.noreply.github.com> Date: Tue, 28 Oct 2025 09:29:38 +0100 Subject: [PATCH] only run ui tests manually with xcode --- .../GhosttyUITests/GhosttyCustomConfigCase.swift | 15 +++++++++++++++ macos/GhosttyUITests/GhosttyThemeTests.swift | 2 +- .../GhosttyTitlebarTabsUITests.swift | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/macos/GhosttyUITests/GhosttyCustomConfigCase.swift b/macos/GhosttyUITests/GhosttyCustomConfigCase.swift index 86e66fa75..41993247a 100644 --- a/macos/GhosttyUITests/GhosttyCustomConfigCase.swift +++ b/macos/GhosttyUITests/GhosttyCustomConfigCase.swift @@ -8,6 +8,21 @@ import XCTest class GhosttyCustomConfigCase: XCTestCase { + /// We only want run these UI tests + /// when testing manually with Xcode IDE + /// + /// So that we don't have to wait for each ci check + /// to run these tedious tests + override class var defaultTestSuite: XCTestSuite { + // https://lldb.llvm.org/cpp_reference/PlatformDarwin_8cpp_source.html#:~:text==%20%22-,IDE_DISABLED_OS_ACTIVITY_DT_MODE + + if ProcessInfo.processInfo.environment["IDE_DISABLED_OS_ACTIVITY_DT_MODE"] != nil { + return XCTestSuite(forTestCaseClass: Self.self) + } else { + return XCTestSuite(name: "Skipping \(className())") + } + } + override class var runsForEachTargetApplicationUIConfiguration: Bool { true } diff --git a/macos/GhosttyUITests/GhosttyThemeTests.swift b/macos/GhosttyUITests/GhosttyThemeTests.swift index eabd2e535..a667d751d 100644 --- a/macos/GhosttyUITests/GhosttyThemeTests.swift +++ b/macos/GhosttyUITests/GhosttyThemeTests.swift @@ -146,7 +146,7 @@ final class GhosttyThemeTests: GhosttyCustomConfigCase { app.launch() // close default window app.typeKey("w", modifierFlags: [.command]) - // open quick termial + // open quick termnial app.menuBarItems["View"].firstMatch.click() app.menuItems["Quick Terminal"].firstMatch.click() let title = "Debug builds of Ghostty are very slow and you may experience performance problems. Debug builds are only recommended during development." diff --git a/macos/GhosttyUITests/GhosttyTitlebarTabsUITests.swift b/macos/GhosttyUITests/GhosttyTitlebarTabsUITests.swift index 7f92779e4..6c32875eb 100644 --- a/macos/GhosttyUITests/GhosttyTitlebarTabsUITests.swift +++ b/macos/GhosttyUITests/GhosttyTitlebarTabsUITests.swift @@ -18,6 +18,7 @@ final class GhosttyTitlebarTabsUITests: GhosttyCustomConfigCase { """ ) } + @MainActor func testCustomTitlebar() throws { let app = try ghosttyApplication()