migrating ui tests using swift 6.2

This commit is contained in:
Mauro Romito
2026-06-24 15:02:35 +02:00
committed by Mauro
parent 057b8728d3
commit 31a9f2c961
4 changed files with 11 additions and 1 deletions
+4 -1
View File
@@ -156,7 +156,10 @@ class RoomScreenUITests: XCTestCase {
private func performOperation(_ operation: UITestsSignal.Timeline, using client: UITestsSignalling.Client) async throws {
try client.send(.timeline(operation))
await _ = client.signals.values.first { $0 == .success }
// The type is not sendable so we can't use the first function directly on the values.
// So we need to make an async iterator which allows us to await a value on the same isolation context.
var iterator = client.signals.values.makeAsyncIterator()
while let signal = await iterator.next(isolation: #isolation), signal != .success { }
try await Task.sleep(for: .seconds(2)) // Allow the timeline to update
}