mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
migrating ui tests using swift 6.2
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ targets:
|
||||
base:
|
||||
PRODUCT_NAME: UITests
|
||||
PRODUCT_BUNDLE_IDENTIFIER: ${BASE_BUNDLE_IDENTIFIER}.ui.tests
|
||||
SWIFT_VERSION: 6.2
|
||||
SWIFT_APPROACHABLE_CONCURRENCY: YES
|
||||
configs:
|
||||
# This is required to remove the $(inherited) flags
|
||||
# which would prevent SnapshotTesting to be imported in UI Tests
|
||||
|
||||
Reference in New Issue
Block a user