We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08dc9f6 commit 96b424eCopy full SHA for 96b424e
CodeEditTests/Features/Activities/ActivityManagerTests.swift
@@ -49,16 +49,24 @@ final class ActivityManagerTests: XCTestCase {
49
}
50
51
func testUpdateTask() async {
52
+ let expectation = XCTestExpectation()
53
await MainActor.run {
54
let activity = activityManager.post(title: "Task Title")
55
56
activityManager.update(
57
id: activity.id,
58
title: "Updated Task Title"
59
)
60
+ }
61
62
+ // Wait for update
63
+ try? await Task.sleep(nanoseconds: 300_000_000) // 0.3 seconds
64
+ await MainActor.run {
65
XCTAssertEqual(activityManager.activities.first?.title, "Updated Task Title")
66
+ expectation.fulfill()
67
68
+
69
+ await fulfillment(of: [expectation], timeout: 1)
70
71
72
func testDeleteTask() async {
0 commit comments