mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
fix auth tests
This commit is contained in:
@@ -26,8 +26,11 @@ class AuthenticationFlowCoordinatorUITests: XCTestCase {
|
|||||||
// Server Selection: Clear the default, enter OIDC server and continue.
|
// Server Selection: Clear the default, enter OIDC server and continue.
|
||||||
app.textFields[A11yIdentifiers.changeServerScreen.server].clearAndTypeText("example.com\n", app: app)
|
app.textFields[A11yIdentifiers.changeServerScreen.server].clearAndTypeText("example.com\n", app: app)
|
||||||
|
|
||||||
|
// Await for the button to be hittable, since a loader may appear
|
||||||
|
let serverConfirmationContinueButton = app.buttons[A11yIdentifiers.serverConfirmationScreen.continue]
|
||||||
|
XCTAssertTrue(serverConfirmationContinueButton.wait(for: \.isHittable, toEqual: true, timeout: 2.0))
|
||||||
// Server Confirmation: Tap continue button
|
// Server Confirmation: Tap continue button
|
||||||
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
|
serverConfirmationContinueButton.tap()
|
||||||
|
|
||||||
// Login Screen: Wait for continue button to appear
|
// Login Screen: Wait for continue button to appear
|
||||||
let continueButton = app.buttons[A11yIdentifiers.loginScreen.continue]
|
let continueButton = app.buttons[A11yIdentifiers.loginScreen.continue]
|
||||||
@@ -56,8 +59,11 @@ class AuthenticationFlowCoordinatorUITests: XCTestCase {
|
|||||||
// Server Selection: Clear the default, enter OIDC server and continue.
|
// Server Selection: Clear the default, enter OIDC server and continue.
|
||||||
app.textFields[A11yIdentifiers.changeServerScreen.server].clearAndTypeText("example.com\n", app: app)
|
app.textFields[A11yIdentifiers.changeServerScreen.server].clearAndTypeText("example.com\n", app: app)
|
||||||
|
|
||||||
|
// Await for the button to be hittable, since a loader may appear
|
||||||
|
let serverConfirmationContinueButton = app.buttons[A11yIdentifiers.serverConfirmationScreen.continue]
|
||||||
|
XCTAssertTrue(serverConfirmationContinueButton.wait(for: \.isHittable, toEqual: true, timeout: 2.0))
|
||||||
// Server Confirmation: Tap continue button
|
// Server Confirmation: Tap continue button
|
||||||
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
|
serverConfirmationContinueButton.tap()
|
||||||
|
|
||||||
// Login Screen: Wait for continue button to appear
|
// Login Screen: Wait for continue button to appear
|
||||||
let continueButton = app.buttons[A11yIdentifiers.loginScreen.continue]
|
let continueButton = app.buttons[A11yIdentifiers.loginScreen.continue]
|
||||||
@@ -88,8 +94,11 @@ class AuthenticationFlowCoordinatorUITests: XCTestCase {
|
|||||||
// Server Selection: Clear the default, enter OIDC server and continue.
|
// Server Selection: Clear the default, enter OIDC server and continue.
|
||||||
app.textFields[A11yIdentifiers.changeServerScreen.server].clearAndTypeText("example.com\n", app: app)
|
app.textFields[A11yIdentifiers.changeServerScreen.server].clearAndTypeText("example.com\n", app: app)
|
||||||
|
|
||||||
|
// Await for the button to be hittable, since a loader may appear
|
||||||
|
let serverConfirmationContinueButton = app.buttons[A11yIdentifiers.serverConfirmationScreen.continue]
|
||||||
|
XCTAssertTrue(serverConfirmationContinueButton.wait(for: \.isHittable, toEqual: true, timeout: 2.0))
|
||||||
// Server Confirmation: Tap continue button
|
// Server Confirmation: Tap continue button
|
||||||
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
|
serverConfirmationContinueButton.tap()
|
||||||
|
|
||||||
// Login Screen: Wait for continue button to appear
|
// Login Screen: Wait for continue button to appear
|
||||||
let continueButton = app.buttons[A11yIdentifiers.loginScreen.continue]
|
let continueButton = app.buttons[A11yIdentifiers.loginScreen.continue]
|
||||||
|
|||||||
Reference in New Issue
Block a user