Add a watchOS test target

New Workouts Watch AppTests bundle wired into the watch scheme. Extracts
the phone-to-watch cache apply/prune into a pure, session-free
WatchCacheApplier seam and makes the HR-zone bucketing a nonisolated
static, so both can be unit-tested off the main actor without a live
WatchConnectivity session.

Claude-Session: https://claude.ai/code/session_01HJDQQDA9QdP8zByg43H5v3
This commit is contained in:
2026-07-08 07:57:24 -04:00
parent a4ed4df756
commit 1b399ee7ba
6 changed files with 387 additions and 14 deletions
+18 -1
View File
@@ -126,7 +126,24 @@ targets:
TARGETED_DEVICE_FAMILY: "4"
DEVELOPMENT_ASSET_PATHS: "\"Workouts Watch App/Preview Content\""
scheme:
testTargets: []
testTargets:
- Workouts Watch AppTests
# ---- watchOS unit tests (bridge apply/prune seam + watch-side helpers) ------
Workouts Watch AppTests:
type: bundle.unit-test
platform: watchOS
sources:
- Workouts Watch AppTests
dependencies:
- target: Workouts Watch App
- package: IndieSync
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: dev.rzen.indie.Workouts.watchkitapp.tests
GENERATE_INFOPLIST_FILE: true
SWIFT_STRICT_CONCURRENCY: complete
WATCHOS_DEPLOYMENT_TARGET: "26.0"
# ---- watchOS widget extension (a launcher complication for the watch face) --
Workouts Watch Widget: