Skip to content

Commit 60096c6

Browse files
committed
Force window presentation in demo mode for UI screenshot tests
Use defaultLaunchBehavior(.presented) and restorationBehavior(.disabled) on macOS demo-mode launches so the WindowGroup main window is reliably created when XCUITest runs the suite under runsForEachTargetApplicationUIConfiguration. The previous reliance on implicit auto-presentation broke after a GitHub-hosted runner image update around 20260402, where the first scene no longer materialized under that special launch mode and accessibility hierarchy contained only the menu bar.
1 parent 2945a7d commit 60096c6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

PatronArchiver/PatronArchiverApp.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ struct PatronArchiverApp: App {
7979
}
8080
#if os(macOS)
8181
#if DEBUG
82+
.defaultLaunchBehavior(Self.isDemoMode ? .presented : .automatic)
83+
.restorationBehavior(Self.isDemoMode ? .disabled : .automatic)
8284
.defaultSize(
8385
width: Self.isDemoMode ? 1440 : 635,
8486
height: Self.isDemoMode ? 848 : 400

0 commit comments

Comments
 (0)