mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 01:52:44 +02:00
Update remaining strings for FTUE.
Include homeserver in view models/state as needed. Pre-fill the user's display name as set by the server.
This commit is contained in:
+18
-4
@@ -31,7 +31,9 @@ class AuthenticationServerSelectionUITests: MockScreenTest {
|
||||
guard let screenState = screenState as? MockAuthenticationServerSelectionScreenState else { fatalError("no screen") }
|
||||
switch screenState {
|
||||
case .matrix:
|
||||
verifyNormalState()
|
||||
verifyRegisterState()
|
||||
case .login:
|
||||
verifyLoginState()
|
||||
case .emptyAddress:
|
||||
verifyEmptyAddress()
|
||||
case .invalidAddress:
|
||||
@@ -41,7 +43,12 @@ class AuthenticationServerSelectionUITests: MockScreenTest {
|
||||
}
|
||||
}
|
||||
|
||||
func verifyNormalState() {
|
||||
func verifyRegisterState() {
|
||||
let title = app.staticTexts["headerTitle"]
|
||||
XCTAssertEqual(title.label, VectorL10n.authenticationServerSelectionRegisterTitle)
|
||||
let message = app.staticTexts["headerMessage"]
|
||||
XCTAssertEqual(message.label, VectorL10n.authenticationServerSelectionRegisterMessage)
|
||||
|
||||
let serverTextField = app.textFields.element
|
||||
XCTAssertEqual(serverTextField.value as? String, "matrix.org", "The server shown should be matrix.org as passed to the view model init.")
|
||||
|
||||
@@ -51,13 +58,20 @@ class AuthenticationServerSelectionUITests: MockScreenTest {
|
||||
XCTAssertTrue(confirmButton.isEnabled, "The confirm button should be enabled when there is an address.")
|
||||
|
||||
let textFieldFooter = app.staticTexts["textFieldFooter"]
|
||||
XCTAssertTrue(textFieldFooter.exists)
|
||||
XCTAssertEqual(textFieldFooter.label, VectorL10n.authenticationServerSelectionServerFooter)
|
||||
XCTAssertFalse(textFieldFooter.exists, "The footer shouldn't be shown when there isn't an error.")
|
||||
|
||||
let dismissButton = app.buttons["dismissButton"]
|
||||
XCTAssertTrue(dismissButton.exists, "The dismiss button should be shown during modal presentation.")
|
||||
}
|
||||
|
||||
|
||||
func verifyLoginState() {
|
||||
let title = app.staticTexts["headerTitle"]
|
||||
XCTAssertEqual(title.label, VectorL10n.authenticationServerSelectionLoginTitle)
|
||||
let message = app.staticTexts["headerMessage"]
|
||||
XCTAssertEqual(message.label, VectorL10n.authenticationServerSelectionLoginMessage)
|
||||
}
|
||||
|
||||
func verifyEmptyAddress() {
|
||||
let serverTextField = app.textFields.element
|
||||
XCTAssertEqual(serverTextField.value as? String, VectorL10n.authenticationServerSelectionServerUrl, "The text field should show placeholder text in this state.")
|
||||
|
||||
Reference in New Issue
Block a user