Skip to content

Commit 76b33ea

Browse files
committed
wip
1 parent c89ffe8 commit 76b33ea

1 file changed

Lines changed: 38 additions & 121 deletions

File tree

Examples/RemindersTests/SearchRemindersTests.swift

Lines changed: 38 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import Testing
88

99
extension BaseTestSuite {
1010
@MainActor
11-
@Suite(
12-
.snapshots(record: .missing)
13-
)
11+
// @Suite(
12+
// .snapshots(record: .missing)
13+
// )
1414
struct SearchRemindersTests {
1515
@Dependency(\.defaultDatabase) var database
1616

@@ -28,38 +28,34 @@ extension BaseTestSuite {
2828
model.searchText = "Take"
2929
try await model.searchTask?.value
3030
#expect(model.searchResults.completedCount == 1)
31-
withKnownIssue(
32-
"'@Fetch' introduces an escaping closure and loses the task-local dependency"
33-
) {
34-
assertInlineSnapshot(of: model.searchResults.rows, as: .customDump) {
35-
"""
36-
[
37-
[0]: SearchRemindersModel.Row(
38-
isPastDue: false,
31+
assertInlineSnapshot(of: model.searchResults.rows, as: .customDump) {
32+
"""
33+
[
34+
[0]: SearchRemindersModel.Row(
35+
isPastDue: true,
36+
notes: "",
37+
reminder: Reminder(
38+
id: UUID(00000000-0000-0000-0000-00000000000A),
39+
dueDate: Date(2009-02-17T23:31:30.000Z),
40+
isFlagged: false,
3941
notes: "",
40-
reminder: Reminder(
41-
id: UUID(00000000-0000-0000-0000-00000000000A),
42-
dueDate: Date(2009-02-17T23:31:30.000Z),
43-
isCompleted: false,
44-
isFlagged: false,
45-
notes: "",
46-
position: 8,
47-
priority: .high,
48-
remindersListID: UUID(00000000-0000-0000-0000-000000000001),
49-
title: "Take out trash"
50-
),
51-
remindersList: RemindersList(
52-
id: UUID(00000000-0000-0000-0000-000000000001),
53-
color: 3985191935,
54-
position: 2,
55-
title: "Family"
56-
),
57-
tags: "",
58-
title: "**Take** out trash"
59-
)
60-
]
61-
"""
62-
}
42+
position: 8,
43+
priority: .high,
44+
remindersListID: UUID(00000000-0000-0000-0000-000000000001),
45+
status: .incomplete,
46+
title: "Take out trash"
47+
),
48+
remindersList: RemindersList(
49+
id: UUID(00000000-0000-0000-0000-000000000001),
50+
color: 3985191935,
51+
position: 2,
52+
title: "Family"
53+
),
54+
tags: "",
55+
title: "**Take** out trash"
56+
)
57+
]
58+
"""
6359
}
6460
}
6561

@@ -68,61 +64,10 @@ extension BaseTestSuite {
6864
model.searchText = "Take"
6965
try await model.showCompletedButtonTapped()
7066

71-
withKnownIssue(
72-
"'@Fetch' introduces an escaping closure and loses the task-local dependency"
73-
) {
74-
assertInlineSnapshot(of: model.searchResults.rows, as: .customDump) {
75-
"""
76-
[
77-
[0]: SearchRemindersModel.Row(
78-
isPastDue: false,
79-
notes: "",
80-
reminder: Reminder(
81-
id: UUID(00000000-0000-0000-0000-00000000000A),
82-
dueDate: Date(2009-02-17T23:31:30.000Z),
83-
isCompleted: false,
84-
isFlagged: false,
85-
notes: "",
86-
position: 8,
87-
priority: .high,
88-
remindersListID: UUID(00000000-0000-0000-0000-000000000001),
89-
title: "Take out trash"
90-
),
91-
remindersList: RemindersList(
92-
id: UUID(00000000-0000-0000-0000-000000000001),
93-
color: 3985191935,
94-
position: 2,
95-
title: "Family"
96-
),
97-
tags: "",
98-
title: "**Take** out trash"
99-
),
100-
[1]: SearchRemindersModel.Row(
101-
isPastDue: false,
102-
notes: "",
103-
reminder: Reminder(
104-
id: UUID(00000000-0000-0000-0000-000000000006),
105-
dueDate: Date(2008-08-07T23:31:30.000Z),
106-
isCompleted: true,
107-
isFlagged: false,
108-
notes: "",
109-
position: 4,
110-
priority: nil,
111-
remindersListID: UUID(00000000-0000-0000-0000-000000000000),
112-
title: "Take a walk"
113-
),
114-
remindersList: RemindersList(
115-
id: UUID(00000000-0000-0000-0000-000000000000),
116-
color: 1218047999,
117-
position: 1,
118-
title: "Personal"
119-
),
120-
tags: "#car #kids #social",
121-
title: "**Take** a walk"
122-
)
123-
]
124-
"""
125-
}
67+
assertInlineSnapshot(of: model.searchResults.rows, as: .customDump) {
68+
"""
69+
[]
70+
"""
12671
}
12772
}
12873

@@ -133,38 +78,10 @@ extension BaseTestSuite {
13378
model.deleteCompletedReminders()
13479
try await model.$searchResults.load()
13580
#expect(model.searchResults.completedCount == 0)
136-
withKnownIssue(
137-
"'@Fetch' introduces an escaping closure and loses the task-local dependency"
138-
) {
139-
assertInlineSnapshot(of: model.searchResults.rows, as: .customDump) {
140-
"""
141-
[
142-
[0]: SearchRemindersModel.Row(
143-
isPastDue: false,
144-
notes: "",
145-
reminder: Reminder(
146-
id: UUID(00000000-0000-0000-0000-00000000000A),
147-
dueDate: Date(2009-02-17T23:31:30.000Z),
148-
isCompleted: false,
149-
isFlagged: false,
150-
notes: "",
151-
position: 8,
152-
priority: .high,
153-
remindersListID: UUID(00000000-0000-0000-0000-000000000001),
154-
title: "Take out trash"
155-
),
156-
remindersList: RemindersList(
157-
id: UUID(00000000-0000-0000-0000-000000000001),
158-
color: 3985191935,
159-
position: 2,
160-
title: "Family"
161-
),
162-
tags: "",
163-
title: "**Take** out trash"
164-
)
165-
]
166-
"""
167-
}
81+
assertInlineSnapshot(of: model.searchResults.rows, as: .customDump) {
82+
"""
83+
[]
84+
"""
16885
}
16986
}
17087
}

0 commit comments

Comments
 (0)