Force windows visible on headless CI runners for UI test rendering
Two fixes: 1. Use FileManager.temporaryDirectory for diagnostics path instead of hardcoded /tmp/ — Process-spawned app inherits the test runner's sandbox and can't write to /tmp/. 2. Add orderFrontRegardless() after activate() in the UI test window creation path — on headless CI runners, activate() silently fails and windows stay invisible, preventing terminal rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6233f1b2f0
commit
94c656fbbd
1 changed files with 5 additions and 0 deletions
|
|
@ -2390,6 +2390,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
|
|||
}
|
||||
self.moveUITestWindowToTargetDisplayIfNeeded()
|
||||
NSRunningApplication.current.activate(options: [.activateAllWindows, .activateIgnoringOtherApps])
|
||||
// On headless CI runners, activate() silently fails (no GUI session).
|
||||
// Force windows visible so the terminal surface starts rendering.
|
||||
for window in NSApp.windows {
|
||||
window.orderFrontRegardless()
|
||||
}
|
||||
self.writeUITestDiagnosticsIfNeeded(stage: "afterForceWindow")
|
||||
}
|
||||
if env["CMUX_UI_TEST_BROWSER_IMPORT_HINT_OPEN_BLANK_BROWSER"] == "1" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue