mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Show an account provider picker on the server confirmation screen when required. (#4137)
* Add a picker mode to the ServerConfirmationScreen. * Hook up the account provider picker in authentication the flow. Simplify the authentication flow coordinator, removing the restricted state. * UI/Snapshot tests.
This commit is contained in:
@@ -202,6 +202,32 @@ class AuthenticationFlowCoordinatorUITests: XCTestCase {
|
||||
app.buttons[A11yIdentifiers.loginScreen.continue].tap()
|
||||
}
|
||||
|
||||
func testMultipleProvidersLoginWithPassword() async throws {
|
||||
// Given the authentication flow with only 2 allowed servers.
|
||||
let app = Application.launch(.multipleProvidersAuthenticationFlow)
|
||||
|
||||
// Then the start screen should be configured appropriately.
|
||||
try await app.assertScreenshot()
|
||||
|
||||
// Splash Screen: Tap get started button
|
||||
app.buttons[A11yIdentifiers.authenticationStartScreen.signIn].tap()
|
||||
|
||||
// Server Confirmation: Tap the picker and confirm
|
||||
app.switches.matching(identifier: A11yIdentifiers.serverConfirmationScreen.serverPicker).element(boundBy: 1).tap()
|
||||
app.buttons[A11yIdentifiers.serverConfirmationScreen.continue].tap()
|
||||
|
||||
// Login Screen: Wait for continue button to appear
|
||||
let continueButton = app.buttons[A11yIdentifiers.loginScreen.continue]
|
||||
XCTAssertTrue(continueButton.waitForExistence(timeout: 2.0))
|
||||
|
||||
// Login Screen: Enter valid credentials
|
||||
app.textFields[A11yIdentifiers.loginScreen.emailUsername].clearAndTypeText("alice\n", app: app)
|
||||
app.secureTextFields[A11yIdentifiers.loginScreen.password].clearAndTypeText("12345678", app: app)
|
||||
|
||||
// Login Screen: Tap next
|
||||
app.buttons[A11yIdentifiers.loginScreen.continue].tap()
|
||||
}
|
||||
|
||||
func verifyReportBugButton(_ app: XCUIApplication) async throws {
|
||||
// Splash Screen: Report a problem button.
|
||||
app.buttons[A11yIdentifiers.authenticationStartScreen.reportAProblem].tap()
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80fd069026bfa66edfa0dc3504e600e5d32fc1b081f255cc9c7dae7643bd3610
|
||||
size 1335111
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c0f65ff050c24acbff22f9687103ea0fe62bd50c20a9af97b5413393697fa173
|
||||
size 1207677
|
||||
Reference in New Issue
Block a user