Update docs/examples to leverage TestStore.send(\.path) (#2868)

This commit is contained in:
Stephen Celis
2024-02-28 17:57:35 -08:00
committed by GitHub
parent b070b765e1
commit 59f5eec0ff
53 changed files with 316 additions and 191 deletions

View File

@@ -46,7 +46,7 @@ final class SyncUpDetailTests: XCTestCase {
$0.speechClient.authorizationStatus = { .denied }
}
await store.send(.destination(.presented(.alert(.openSettings)))) {
await store.send(\.destination.alert.openSettings) {
$0.destination = nil
}
XCTAssertEqual(settingsOpened.value, true)
@@ -64,7 +64,7 @@ final class SyncUpDetailTests: XCTestCase {
$0.speechClient.authorizationStatus = { .denied }
}
await store.send(.destination(.presented(.alert(.continueWithoutRecording)))) {
await store.send(\.destination.alert.continueWithoutRecording) {
$0.destination = nil
}
@@ -96,7 +96,7 @@ final class SyncUpDetailTests: XCTestCase {
}
syncUp.title = "Blob's Meeting"
await store.send(.destination(.presented(.edit(.set(\.syncUp, syncUp))))) {
await store.send(\.destination.edit.syncUp, syncUp) {
$0.$destination[case: \.edit]?.syncUp.title = "Blob's Meeting"
}
@@ -124,7 +124,7 @@ final class SyncUpDetailTests: XCTestCase {
await store.send(.deleteButtonTapped) {
$0.destination = .alert(.deleteSyncUp)
}
await store.send(.destination(.presented(.alert(.confirmDeletion)))) {
await store.send(\.destination.alert.confirmDeletion) {
$0.destination = nil
}
await store.receive(\.delegate.deleteSyncUp)