mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fix the integration tests. (#4084)
* Fix logging/alerts during OIDC cancellation. - Cancelling from within the web view wasn't being handled since moving the UserIndicatorController into the presenter. - The WAS canceledLogin error code is also used when the system cancels the login. When the system cancels there's a failure reason included in the error. * Allow UI tests to tap on any point within a view. * Make the homeserver optional in integration tests. * Dismiss the keyboard after entering a username to reveal the password text field. Do the same after entering the password field too, just in case. * Add a loop while waiting for the WAS prompt to be shown.
This commit is contained in:
@@ -5,11 +5,12 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import XCTest
|
||||
|
||||
extension XCUIElement {
|
||||
func clearAndTypeText(_ text: String, app: XCUIApplication) {
|
||||
tapCenter()
|
||||
tap(.center)
|
||||
|
||||
app.showKeyboardIfNeeded()
|
||||
|
||||
@@ -26,8 +27,8 @@ extension XCUIElement {
|
||||
}
|
||||
}
|
||||
|
||||
func tapCenter() {
|
||||
let coordinate: XCUICoordinate = coordinate(withNormalizedOffset: .init(dx: 0.5, dy: 0.5))
|
||||
func tap(_ point: UnitPoint) {
|
||||
let coordinate = coordinate(withNormalizedOffset: .init(dx: point.x, dy: point.y))
|
||||
coordinate.tap()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user