test: add ShotdeckTests target — real launch/bootstrap wiring regression (coverage gap)
The Core-level regression tests added for the launch-paths BLOCKER (ReturnWatcherTests.swift) hand-replicate what AppDelegate.makeLaunchModel() and AppModel.bootstrap() do, rather than calling them — a future revert of either would not fail `swift test`. Neither lives in ShotdeckCore, so ShotdeckCoreTests cannot reach them; this new test target depends on the Shotdeck executable target itself and uses @testable import (confirmed this works cleanly with SwiftPM despite Shotdeck's main.swift top-level-code entry point — no separate main-symbol conflict). realLaunchModelAndBootstrapDetectAMarkedOneDriveReturn persists transport=.oneDrive (UserDefaults.standard, snapshot-and-restore — the same established pattern PickerSelfTest's ONEDRIVE-SELFTEST phase already uses, since neither of these real call sites has any defaults-threading to plug an isolated suite into), calls AppDelegate.makeLaunchModel(appSupportRoot: <temp>) and awaits model.bootstrap() UNMODIFIED, then drops a marked-up Redline PDF into the temp OneDrive folder and asserts the watcher reports it. Verified this test actually catches the original blocker: temporarily reverted makeLaunchModel() to the AirDrop-only resolver, and separately reverted bootstrap()'s updateWatchFolder reconcile — both reproduce the failure (the discarded revert is not part of this commit). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZiTXPbPCSjzPVsfoweAbp
This commit is contained in:
@@ -27,5 +27,14 @@ let package = Package(
|
||||
dependencies: ["ShotdeckCore"],
|
||||
swiftSettings: [.swiftLanguageMode(.v6)]
|
||||
),
|
||||
// Exercises the real Shotdeck-app-target wiring (AppDelegate.makeLaunchModel(),
|
||||
// AppModel.bootstrap()) via @testable import — logic ShotdeckCoreTests cannot
|
||||
// reach because it only depends on ShotdeckCore, not the Shotdeck executable
|
||||
// target itself. See ReturnWatcherLaunchWiringTests.swift.
|
||||
.testTarget(
|
||||
name: "ShotdeckTests",
|
||||
dependencies: ["Shotdeck", "ShotdeckCore"],
|
||||
swiftSettings: [.swiftLanguageMode(.v6)]
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user