Updates following self review.

This commit is contained in:
Doug
2022-03-17 19:08:25 +00:00
parent d72b815dc1
commit 8a3664b1f2
17 changed files with 86 additions and 61 deletions
@@ -49,6 +49,10 @@ class OnboardingDisplayNameUITests: MockScreenTest {
let footer = app.staticTexts["textFieldFooter"]
XCTAssertTrue(footer.exists, "The textfield's footer should always be shown.")
XCTAssertEqual(footer.label, VectorL10n.onboardingDisplayNameHint, "The footer should display a hint when no text is set.")
let saveButton = app.buttons["saveButton"]
XCTAssertTrue(saveButton.exists, "There should be a save button.")
XCTAssertFalse(saveButton.isEnabled, "The save button should not be enabled.")
}
func verifyDisplayName(displayName: String) {
@@ -57,6 +61,10 @@ class OnboardingDisplayNameUITests: MockScreenTest {
XCTAssertEqual(textField.value as? String, displayName, "When a name has been set, it should show in the textfield.")
XCTAssertEqual(textField.placeholderValue, VectorL10n.onboardingDisplayNamePlaceholder, "The textfield's placeholder should be set.")
let saveButton = app.buttons["saveButton"]
XCTAssertTrue(saveButton.exists, "There should be a save button.")
XCTAssertTrue(saveButton.isEnabled, "The save button should be enabled.")
let footer = app.staticTexts["textFieldFooter"]
XCTAssertTrue(footer.exists, "The textfield's footer should always be shown.")
XCTAssertEqual(footer.label, VectorL10n.onboardingDisplayNameHint, "The footer should display a hint when an acceptable name is entered.")
@@ -71,5 +79,9 @@ class OnboardingDisplayNameUITests: MockScreenTest {
let footer = app.staticTexts["textFieldFooter"]
XCTAssertTrue(footer.exists, "The textfield's footer should always be shown.")
XCTAssertEqual(footer.label, VectorL10n.onboardingDisplayNameMaxLength, "The footer should display an error when the display name is too long.")
let saveButton = app.buttons["saveButton"]
XCTAssertTrue(saveButton.exists, "There should be a save button.")
XCTAssertFalse(saveButton.isEnabled, "The save button should not be enabled.")
}
}