Skip to content

Commit 8e3ff3d

Browse files
authored
Tutorial fixes (#2693)
Noted a few things while watching @vincent-pradeilles work his way through it.
1 parent 7dc85c9 commit 8e3ff3d

File tree

11 files changed

+17
-20
lines changed

11 files changed

+17
-20
lines changed

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-MultipleDestinations.tutorial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@Tutorial(time: 30) {
22
@Intro(title: "Multiple presentation destinations") {
3-
In the previous section you learned how model your domains so that a parent feature can
3+
In the previous section you learned how to model your domains so that a parent feature can
44
present a child feature. Now let's learn what has to be done if a parent feature wants to be
55
able to present _many_ features.
66
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0005.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class ContactsFeatureTests: XCTestCase {
1313
await store.send(.addButtonTapped) {
1414
$0.destination = .addContact(
1515
AddContactFeature.State(
16-
Contact(id: ???, name: "")
16+
contact: Contact(id: ???, name: "")
1717
)
1818
)
1919
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008-previous.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class ContactsFeatureTests: XCTestCase {
1313
await store.send(.addButtonTapped) {
1414
$0.destination = .addContact(
1515
AddContactFeature.State(
16-
Contact(id: ???, name: "")
16+
contact: Contact(id: ???, name: "")
1717
)
1818
)
1919
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ContactsFeatureTests: XCTestCase {
1515
await store.send(.addButtonTapped) {
1616
$0.destination = .addContact(
1717
AddContactFeature.State(
18-
Contact(id: ???, name: "")
18+
contact: Contact(id: ???, name: "")
1919
)
2020
)
2121
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0009.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ContactsFeatureTests: XCTestCase {
1515
await store.send(.addButtonTapped) {
1616
$0.destination = .addContact(
1717
AddContactFeature.State(
18-
Contact(id: UUID(0), name: "")
18+
contact: Contact(id: UUID(0), name: "")
1919
)
2020
)
2121
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0010.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ContactsFeatureTests: XCTestCase {
1515
await store.send(.addButtonTapped) {
1616
$0.destination = .addContact(
1717
AddContactFeature.State(
18-
Contact(id: UUID(0), name: "")
18+
contact: Contact(id: UUID(0), name: "")
1919
)
2020
)
2121
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0011.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ContactsFeatureTests: XCTestCase {
1515
await store.send(.addButtonTapped) {
1616
$0.destination = .addContact(
1717
AddContactFeature.State(
18-
Contact(id: UUID(0), name: "")
18+
contact: Contact(id: UUID(0), name: "")
1919
)
2020
)
2121
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0012.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ContactsFeatureTests: XCTestCase {
1515
await store.send(.addButtonTapped) {
1616
$0.destination = .addContact(
1717
AddContactFeature.State(
18-
Contact(id: UUID(0), name: "")
18+
contact: Contact(id: UUID(0), name: "")
1919
)
2020
)
2121
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0013.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ContactsFeatureTests: XCTestCase {
1515
await store.send(.addButtonTapped) {
1616
$0.destination = .addContact(
1717
AddContactFeature.State(
18-
Contact(id: UUID(0), name: "")
18+
contact: Contact(id: UUID(0), name: "")
1919
)
2020
)
2121
}
@@ -24,9 +24,8 @@ final class ContactsFeatureTests: XCTestCase {
2424
}
2525
await store.send(.destination(.presented(.addContact(.saveButtonTapped))))
2626
await store.receive(
27-
.destination(
28-
.presented(.addContact(.delegate(.saveContact(Contact(id: UUID(0), name: "Blob Jr.")))))
29-
)
27+
\.destination.addContact.delegate.saveContact,
28+
Contact(id: UUID(0), name: "Blob Jr.")
3029
) {
3130
}
3231
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0014.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class ContactsFeatureTests: XCTestCase {
1515
await store.send(.addButtonTapped) {
1616
$0.destination = .addContact(
1717
AddContactFeature.State(
18-
Contact(id: UUID(0), name: "")
18+
contact: Contact(id: UUID(0), name: "")
1919
)
2020
)
2121
}
@@ -24,9 +24,8 @@ final class ContactsFeatureTests: XCTestCase {
2424
}
2525
await store.send(.destination(.presented(.addContact(.saveButtonTapped))))
2626
await store.receive(
27-
.destination(
28-
.presented(.addContact(.delegate(.saveContact(Contact(id: UUID(0), name: "Blob Jr.")))))
29-
)
27+
\.destination.addContact.delegate.saveContact,
28+
Contact(id: UUID(0), name: "Blob Jr.")
3029
) {
3130
$0.contacts = [
3231
Contact(id: UUID(0), name: "Blob Jr.")

0 commit comments

Comments
 (0)