Skip to content

Commit

Permalink
Merge pull request #1942 from nextcloud/fix-login-test
Browse files Browse the repository at this point in the history
fix(tests): Login
  • Loading branch information
Ivansss authored Jan 15, 2025
2 parents ecb08b8 + 6a02ca2 commit b72294f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions NextcloudTalkTests/UI/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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))
Expand Down

0 comments on commit b72294f

Please sign in to comment.