mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Wait for the search field to be usable and remove unnecessary sleeps.
This commit is contained in:
@@ -28,13 +28,9 @@ class UserFlowTests: XCTestCase {
|
|||||||
|
|
||||||
/// Assumes app is on the home screen
|
/// Assumes app is on the home screen
|
||||||
private func checkRoomFlows() {
|
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
|
// Search for the special test room
|
||||||
let searchField = app.searchFields.firstMatch
|
let searchField = app.searchFields.firstMatch
|
||||||
|
XCTAssertTrue(searchField.waitForExistence(timeout: 30))
|
||||||
searchField.clearAndTypeText(Self.integrationTestsRoomName, app: app)
|
searchField.clearAndTypeText(Self.integrationTestsRoomName, app: app)
|
||||||
|
|
||||||
// And open it
|
// And open it
|
||||||
@@ -68,8 +64,6 @@ class UserFlowTests: XCTestCase {
|
|||||||
XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0))
|
XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0))
|
||||||
sendButton.tap(.center)
|
sendButton.tap(.center)
|
||||||
|
|
||||||
sleep(10) // Wait for the message to be sent
|
|
||||||
|
|
||||||
// Switch to the rich text editor
|
// Switch to the rich text editor
|
||||||
tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
|
tapOnButton(A11yIdentifiers.roomScreen.composerToolbar.openComposeOptions)
|
||||||
tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting)
|
tapOnButton(A11yIdentifiers.roomScreen.attachmentPickerTextFormatting)
|
||||||
@@ -82,8 +76,6 @@ class UserFlowTests: XCTestCase {
|
|||||||
XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0))
|
XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0))
|
||||||
sendButton.tap(.center)
|
sendButton.tap(.center)
|
||||||
|
|
||||||
sleep(5) // Wait for the message to be sent
|
|
||||||
|
|
||||||
// Close the formatting options
|
// Close the formatting options
|
||||||
app.buttons[A11yIdentifiers.roomScreen.composerToolbar.closeFormattingOptions].tap(.center)
|
app.buttons[A11yIdentifiers.roomScreen.composerToolbar.closeFormattingOptions].tap(.center)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user