From aad423dacc3d12fbb1298f004b9605bed262c20b Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 15 Oct 2024 08:44:06 +0300 Subject: [PATCH] Fix integration tests after `clearAndTypeText` signature change. --- IntegrationTests/Sources/Common.swift | 6 +++--- IntegrationTests/Sources/UserFlowTests.swift | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/IntegrationTests/Sources/Common.swift b/IntegrationTests/Sources/Common.swift index e79483605a..b540a3b11d 100644 --- a/IntegrationTests/Sources/Common.swift +++ b/IntegrationTests/Sources/Common.swift @@ -21,7 +21,7 @@ extension XCUIApplication { let homeserverTextField = textFields[A11yIdentifiers.changeServerScreen.server] XCTAssertTrue(homeserverTextField.waitForExistence(timeout: 10.0)) - homeserverTextField.clearAndTypeText(homeserver) + homeserverTextField.clearAndTypeText(homeserver, app: self) let confirmButton = buttons[A11yIdentifiers.changeServerScreen.continue] XCTAssertTrue(confirmButton.waitForExistence(timeout: 10.0)) @@ -39,12 +39,12 @@ extension XCUIApplication { let usernameTextField = textFields[A11yIdentifiers.loginScreen.emailUsername] XCTAssertTrue(usernameTextField.waitForExistence(timeout: 10.0)) - usernameTextField.clearAndTypeText(username) + usernameTextField.clearAndTypeText(username, app: self) let passwordTextField = secureTextFields[A11yIdentifiers.loginScreen.password] XCTAssertTrue(passwordTextField.waitForExistence(timeout: 10.0)) - passwordTextField.clearAndTypeText(password) + passwordTextField.clearAndTypeText(password, app: self) let nextButton = buttons[A11yIdentifiers.loginScreen.continue] XCTAssertTrue(nextButton.waitForExistence(timeout: 10.0)) diff --git a/IntegrationTests/Sources/UserFlowTests.swift b/IntegrationTests/Sources/UserFlowTests.swift index 46ae747e8d..04edd6bcc5 100644 --- a/IntegrationTests/Sources/UserFlowTests.swift +++ b/IntegrationTests/Sources/UserFlowTests.swift @@ -32,7 +32,7 @@ class UserFlowTests: XCTestCase { private func checkRoomFlows() { // Search for the special test room let searchField = app.searchFields.firstMatch - searchField.clearAndTypeText(Self.integrationTestsRoomName) + searchField.clearAndTypeText(Self.integrationTestsRoomName, app: app) // And open it let firstRoom = app.buttons.matching(NSPredicate(format: "identifier CONTAINS %@", Self.integrationTestsRoomName)).firstMatch @@ -63,7 +63,7 @@ class UserFlowTests: XCTestCase { private func sendMessages() { var composerTextField = app.textViews[A11yIdentifiers.roomScreen.messageComposer].firstMatch XCTAssertTrue(composerTextField.waitForExistence(timeout: 10.0)) - composerTextField.clearAndTypeText(Self.integrationTestsMessage) + composerTextField.clearAndTypeText(Self.integrationTestsMessage, app: app) var sendButton = app.buttons[A11yIdentifiers.roomScreen.sendButton].firstMatch XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0)) @@ -77,7 +77,7 @@ class UserFlowTests: XCTestCase { composerTextField = app.textViews[A11yIdentifiers.roomScreen.messageComposer].firstMatch XCTAssertTrue(composerTextField.waitForExistence(timeout: 10.0)) - composerTextField.clearAndTypeText(Self.integrationTestsMessage) + composerTextField.clearAndTypeText(Self.integrationTestsMessage, app: app) sendButton = app.buttons[A11yIdentifiers.roomScreen.sendButton].firstMatch XCTAssertTrue(sendButton.waitForExistence(timeout: 10.0))