#40: Use the Rust AuthenticationService.

* Update SDK package to 1.0.12-alpha.
* Use an app group for storage and stop stripping the http from the homeserver when configuring the service.
* Rename access token to restore token.
* Remove matrix.org server description inline with latest FTUE changes.
This commit is contained in:
Doug
2022-07-27 10:57:16 +01:00
committed by GitHub
parent 03d6097c72
commit 1878a16496
29 changed files with 284 additions and 204 deletions
-16
View File
@@ -32,7 +32,6 @@ class LoginScreenUITests: XCTestCase {
app.goToScreenWithIdentifier(.login)
let state = "matrix.org"
validateServerDescriptionIsVisible(for: state)
validateLoginFormIsVisible(for: state)
validateOIDCButtonIsHidden(for: state)
validateNextButtonIsDisabled(for: state)
@@ -61,7 +60,6 @@ class LoginScreenUITests: XCTestCase {
// Then the screen should be configured for OIDC.
let state = "an OIDC only server"
validateOIDCButtonIsShown(for: state)
validateServerDescriptionIsHidden(for: state)
validateLoginFormIsHidden(for: state)
validateUnsupportedServerTextIsHidden(for: state)
}
@@ -78,24 +76,10 @@ class LoginScreenUITests: XCTestCase {
// Then the screen should not allow login to continue.
let state = "an unsupported server"
validateUnsupportedServerTextIsShown(for: state)
validateServerDescriptionIsHidden(for: state)
validateLoginFormIsHidden(for: state)
validateOIDCButtonIsHidden(for: state)
}
/// Checks that the server description label is shown.
func validateServerDescriptionIsVisible(for state: String) {
let descriptionLabel = app.staticTexts["serverDescriptionText"]
XCTAssertTrue(descriptionLabel.exists, "The server description should be shown for \(state).")
XCTAssertEqual(descriptionLabel.label, ElementL10n.authenticationServerInfoMatrixDescription)
}
/// Checks that the server description label is hidden.
func validateServerDescriptionIsHidden(for state: String) {
let descriptionLabel = app.staticTexts["serverDescriptionText"]
XCTAssertFalse(descriptionLabel.exists, "The server description should be hidden for \(state).")
}
/// Checks that the username and password text fields are shown along with the next button.
func validateLoginFormIsVisible(for state: String) {
let usernameTextField = app.textFields.element