From e8c7d0761f0b8fdbfe2f2885098d0f45aa631b24 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Fri, 15 May 2026 11:43:37 +0300 Subject: [PATCH] Wait for the search field to be usable and remove unnecessary sleeps. --- IntegrationTests/Sources/UserFlowTests.swift | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/IntegrationTests/Sources/UserFlowTests.swift b/IntegrationTests/Sources/UserFlowTests.swift index f1187345e..239864066 100644 --- a/IntegrationTests/Sources/UserFlowTests.swift +++ b/IntegrationTests/Sources/UserFlowTests.swift @@ -28,13 +28,9 @@ class UserFlowTests: XCTestCase { /// Assumes app is on the home screen private func checkRoomFlows() { - // Wait for the room list to paginate and correctly compute the room display names otherwise the test room - // won't be found - // Remove once https://github.com/element-hq/element-x-ios/issues/3365 gets sorted - sleep(30) - // Search for the special test room let searchField = app.searchFields.firstMatch + XCTAssertTrue(searchField.waitForExistence(timeout: 30)) searchField.clearAndTypeText(Self.integrationTestsRoomName, app: app) // And open it @@ -68,8 +64,6 @@ class UserFlowTests: XCTestCase { XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0)) sendButton.tap(.center) - sleep(10) // Wait for the message to be sent - // Switch to the rich text editor tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions) tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting) @@ -82,8 +76,6 @@ class UserFlowTests: XCTestCase { XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0)) sendButton.tap(.center) - sleep(5) // Wait for the message to be sent - // Close the formatting options app.buttons[A11yIdentifiers.roomScreen.composerToolbar.closeFormattingOptions].tap(.center) }