Use iOS 26 Observation for Unit and Preview tests. (#5797)

* use observation in unit and preview tests instead of the async stream

* use a parsing approach that is independent of the sourcery annotation

* Fix observation deferred fulfillments not receiving the initial value

Observation's observe only emits transitions, not the value present at subscription time. Drop the leading initial value from the affected transitionValues sequences and assert it directly with #expect instead.

* improved docs
This commit is contained in:
Mauro
2026-06-30 14:01:08 +02:00
committed by GitHub
parent c26677753a
commit 2d486ece33
24 changed files with 308 additions and 239 deletions
@@ -237,6 +237,7 @@ private struct RecoveryKeyView: View {
// MARK: - Previews
@available(iOS 26.0, *)
struct SecureBackupRecoveryKeyScreen_Previews: PreviewProvider, TestablePreview {
static let key = "EsTM njec uHYA yHmh dQdW Nj4o bNRU 9jMN XGMc KUNM UFr5 R8GY"
static let notSetUpViewModel = viewModel(recoveryState: .disabled)