Fix authentication UI tests. (#1010)

* Fix authentication flow UI tests.

* Fix analytics prompt snapshot.
This commit is contained in:
Doug
2023-06-02 12:41:45 +01:00
committed by GitHub
parent 61f870def7
commit eb1f1baed6
3 changed files with 4 additions and 8 deletions

View File

@@ -74,7 +74,6 @@ struct A11yIdentifiers {
let emailUsername = "login-email_username"
let password = "login-password"
let `continue` = "login-continue"
let oidc = "login-oidc"
let unsupportedServer = "login-unsupported_server"
}

View File

@@ -30,9 +30,6 @@ class AuthenticationCoordinatorUITests: XCTestCase {
// Server Confirmation: Tap continue button
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
// Login Screen: Confirm password login is available and not OIDC.
XCTAssertFalse(app.buttons[A11yIdentifiers.loginScreen.oidc].exists, "The OIDC button shouldn't be shown before entering a supported homeserver.")
// Login Screen: Enter valid credentials
app.textFields[A11yIdentifiers.loginScreen.emailUsername].clearAndTypeText("alice\n")
app.secureTextFields[A11yIdentifiers.loginScreen.password].clearAndTypeText("12345678")
@@ -86,7 +83,7 @@ class AuthenticationCoordinatorUITests: XCTestCase {
// Server Confirmation: Tap continue button
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
// Then the login form should be updated for OIDC.
XCTAssertTrue(app.buttons[A11yIdentifiers.loginScreen.oidc].waitForExistence(timeout: 1), "The OIDC button should be shown after selecting a homeserver with OIDC.")
// Then the login form shouldn't be shown as OIDC will be used instead.
XCTAssertFalse(app.buttons[A11yIdentifiers.loginScreen.continue].waitForExistence(timeout: 1), "The login screen should not be shown after selecting a homeserver with OIDC.")
}
}

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0dfb9ecf7c1054dba557d7fa711d3909da023295c0c8e10800680af8a0202b46
size 226506
oid sha256:31539469bea08e6c3896560edeadc848fca67a028d2e98646bfe57ee0f926ede
size 199134