diff --git a/NextcloudTalkTests/UI/UIRoomTest.swift b/NextcloudTalkTests/UI/UIRoomTest.swift index 0363d61e4..28df6e22f 100644 --- a/NextcloudTalkTests/UI/UIRoomTest.swift +++ b/NextcloudTalkTests/UI/UIRoomTest.swift @@ -30,9 +30,15 @@ final class UIRoomTest: XCTestCase { func createConversation(for app: XCUIApplication, with newConversationName: String) { app.navigationBars["Nextcloud Talk"].buttons["Create or join a conversation"].tap() - app.buttons["Create a new conversation"].tap() + + let createNewConversationButton = app.buttons["Create a new conversation"] + XCTAssert(createNewConversationButton.waitForExistence(timeout: TestConstants.timeoutShort)) + createNewConversationButton.tap() + + let newConversationNavBar = app.navigationBars["New conversation"] + XCTAssert(newConversationNavBar.waitForExistence(timeout: TestConstants.timeoutShort)) app.typeText(newConversationName) - app.navigationBars["New conversation"].buttons["Create"].tap() + newConversationNavBar.buttons["Create"].tap() } func testCreateConversation() {