Skip to content

2.2.0

Choose a tag to compare

@nikolainobadi nikolainobadi released this 23 May 21:02
· 7 commits to main since this release
38d3222

NnTestKit 2.2.0

Released 2026-05-23

This release expands @Observable testing support and adds a UI test helper for time-based date pickers.

Highlights

  • Observation testing helpers — bridge @Observable properties to async streams and assert on change propagation, mirroring the ergonomics of the existing Combine helpers.
  • Time picker UI helper — drive compact DatePickers configured for hour/minute selection, with AM/PM support for 12-hour locales.

What's New

NnSwiftTestingHelpers

  • observationStream(of:) — bridges an @Observable property to an AsyncStream of post-change values, mirroring Published.Publisher.waitUntil from CombineHelpers. Available on macOS 14+, iOS 17+, tvOS 17+, watchOS 10+.
  • AsyncStream.waitUntil(timeout:condition:) — awaits a value that satisfies a predicate, throwing AsyncStream.WaitError.timeout if it isn't reached in time.
  • expectObservationFires(when:afterReading:timeout:sourceLocation:) — a one-shot assertion that verifies an @Observable property change propagates through withObservationTracking after running a trigger.

NnUITestHelpers

  • selectTime(pickerId:hour:minute:period:timeout:) on BaseUITestCase — adjusts compact-style DatePickers configured with displayedComponents: .hourAndMinute, including optional AM/PM wheel support for 12-hour locales.

Compatibility

No breaking changes. The new observation helpers require macOS 14+ / iOS 17+ / tvOS 17+ / watchOS 10+.


Full changelog: v2.1.0...v2.2.0