From 6a02ca2db83c064a110f5fd274932214d7750339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Wed, 15 Jan 2025 09:44:03 +0100 Subject: [PATCH] fix(tests): Login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- NextcloudTalkTests/UI/Helpers.swift | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/NextcloudTalkTests/UI/Helpers.swift b/NextcloudTalkTests/UI/Helpers.swift index 6754e4adc..eef426f2c 100644 --- a/NextcloudTalkTests/UI/Helpers.swift +++ b/NextcloudTalkTests/UI/Helpers.swift @@ -65,10 +65,6 @@ extension XCTestCase { loginButton.tap() let webViewsQuery = app.webViews.webViews.webViews - let main = webViewsQuery.otherElements["main"] - - // Wait for the webview to be available - XCTAssert(main.waitForExistence(timeout: TestConstants.timeoutLong)) // Wait for the login button to be available and to get enabled/hittable let loginButtonWeb = webViewsQuery.buttons["Log in"] @@ -78,10 +74,8 @@ extension XCTestCase { loginButtonWeb.tap() - XCTAssert(main.waitForExistence(timeout: TestConstants.timeoutLong)) - - let usernameTextField = main.descendants(matching: .textField).firstMatch - let passwordTextField = main.descendants(matching: .secureTextField).firstMatch + let usernameTextField = webViewsQuery.descendants(matching: .textField).firstMatch + let passwordTextField = webViewsQuery.descendants(matching: .secureTextField).firstMatch XCTAssert(usernameTextField.waitForExistence(timeout: TestConstants.timeoutLong)) XCTAssert(passwordTextField.waitForExistence(timeout: TestConstants.timeoutLong))