mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fix authentication UI tests. (#1010)
* Fix authentication flow UI tests. * Fix analytics prompt snapshot.
This commit is contained in:
@@ -74,7 +74,6 @@ struct A11yIdentifiers {
|
|||||||
let emailUsername = "login-email_username"
|
let emailUsername = "login-email_username"
|
||||||
let password = "login-password"
|
let password = "login-password"
|
||||||
let `continue` = "login-continue"
|
let `continue` = "login-continue"
|
||||||
let oidc = "login-oidc"
|
|
||||||
let unsupportedServer = "login-unsupported_server"
|
let unsupportedServer = "login-unsupported_server"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ class AuthenticationCoordinatorUITests: XCTestCase {
|
|||||||
// Server Confirmation: Tap continue button
|
// Server Confirmation: Tap continue button
|
||||||
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
|
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
|
// Login Screen: Enter valid credentials
|
||||||
app.textFields[A11yIdentifiers.loginScreen.emailUsername].clearAndTypeText("alice\n")
|
app.textFields[A11yIdentifiers.loginScreen.emailUsername].clearAndTypeText("alice\n")
|
||||||
app.secureTextFields[A11yIdentifiers.loginScreen.password].clearAndTypeText("12345678")
|
app.secureTextFields[A11yIdentifiers.loginScreen.password].clearAndTypeText("12345678")
|
||||||
@@ -86,7 +83,7 @@ class AuthenticationCoordinatorUITests: XCTestCase {
|
|||||||
// Server Confirmation: Tap continue button
|
// Server Confirmation: Tap continue button
|
||||||
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
|
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
|
||||||
|
|
||||||
// Then the login form should be updated for OIDC.
|
// Then the login form shouldn't be shown as OIDC will be used instead.
|
||||||
XCTAssertTrue(app.buttons[A11yIdentifiers.loginScreen.oidc].waitForExistence(timeout: 1), "The OIDC button should be shown after selecting a homeserver with OIDC.")
|
XCTAssertFalse(app.buttons[A11yIdentifiers.loginScreen.continue].waitForExistence(timeout: 1), "The login screen should not be shown after selecting a homeserver with OIDC.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:0dfb9ecf7c1054dba557d7fa711d3909da023295c0c8e10800680af8a0202b46
|
oid sha256:31539469bea08e6c3896560edeadc848fca67a028d2e98646bfe57ee0f926ede
|
||||||
size 226506
|
size 199134
|
||||||
|
|||||||
Reference in New Issue
Block a user