mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Fix authentication UI tests. (#1010)
* Fix authentication flow UI tests. * Fix analytics prompt snapshot.
This commit is contained in:
parent
44062adb0f
commit
fedd401a56
@ -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.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.analyticsPrompt.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.analyticsPrompt.png
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user