Summary
View.platformIOSHapticFeedback and IOSHapticStyle in Framework/Sources/Platform/iOS/Views/Extensions/PlatformIOSOptimizationsLayer5.swift have no executing tests. Spawned from #402: the orphan L5 suite was removed; its haptic tests only called an empty verifyViewCreation and never ran.
Current production
iOS: modifier applies .onChange(of: trigger) and fires UIImpactFeedbackGenerator (.light / .medium / .heavy) or UINotificationFeedbackGenerator (.success / .warning / .error).
Non-iOS: stub func platformIOSHapticFeedback(style: Any = "light", onTrigger: Bool = true) -> some View { self }.
IOSHapticStyle is #if os(iOS) only (not CaseIterable).
Desired tests
Add tests in executing SixLayerFrameworkUnitTests (iOS Simulator unit lane). Strict TDD (strict-tdd-definition): invert new observations, runtime red, then green. No .serialized. Cheapest truthful layer (testing-layer-priority):
- Unit:
IOSHapticStyle cases are distinct (all six).
- View subject type:
expectViewSubjectTypeContains (or equivalent) that the iOS modifier actually wraps the root (invert dummy name, lock from got:). Do not lock AnyView.
- Non-iOS stub (macOS unit): applying the stub still yields a view whose subject type contains the original root (
Text, etc.) — identity, not a crash.
Do not assert that a Taptic Engine fired (not observable in unit tests). Do not reintroduce LayeredTestingSuite.
Related (not this issue unless you expand scope)
Same file, also untested in executing targets: platformIOSNavigationBar, platformIOSToolbar, platformIOSSwipeGestures, platformIOSAccessibility, platformIOSAnimation, platformIOSLayout, platformIOSPullToRefresh, platformIOSContextMenu. Split those if they grow.
References
Summary
View.platformIOSHapticFeedbackandIOSHapticStyleinFramework/Sources/Platform/iOS/Views/Extensions/PlatformIOSOptimizationsLayer5.swifthave no executing tests. Spawned from #402: the orphan L5 suite was removed; its haptic tests only called an emptyverifyViewCreationand never ran.Current production
iOS: modifier applies
.onChange(of: trigger)and firesUIImpactFeedbackGenerator(.light/.medium/.heavy) orUINotificationFeedbackGenerator(.success/.warning/.error).Non-iOS: stub
func platformIOSHapticFeedback(style: Any = "light", onTrigger: Bool = true) -> some View { self }.IOSHapticStyleis#if os(iOS)only (notCaseIterable).Desired tests
Add tests in executing
SixLayerFrameworkUnitTests(iOS Simulator unit lane). Strict TDD (strict-tdd-definition): invert new observations, runtime red, then green. No.serialized. Cheapest truthful layer (testing-layer-priority):IOSHapticStylecases are distinct (all six).expectViewSubjectTypeContains(or equivalent) that the iOS modifier actually wraps the root (invert dummy name, lock fromgot:). Do not lockAnyView.Text, etc.) — identity, not a crash.Do not assert that a Taptic Engine fired (not observable in unit tests). Do not reintroduce
LayeredTestingSuite.Related (not this issue unless you expand scope)
Same file, also untested in executing targets:
platformIOSNavigationBar,platformIOSToolbar,platformIOSSwipeGestures,platformIOSAccessibility,platformIOSAnimation,platformIOSLayout,platformIOSPullToRefresh,platformIOSContextMenu. Split those if they grow.References
PlatformIOSOptimizationsLayer5.swift