Created
July 3, 2022 09:41
-
-
Save paigeshin/aeb304b963a665108c1b3c3dad86bca1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func test_should_display_error_message_for_missing_required_fields() { | |
| let app = XCUIApplication() | |
| continueAfterFailure = false | |
| app.launch() | |
| let usernameTextField = app.textFields["usernameTextField"] | |
| usernameTextField.tap() | |
| usernameTextField.typeText("") | |
| let passwordTextField = app.textFields["passwordTextField"] | |
| passwordTextField.tap() | |
| passwordTextField.typeText("") | |
| let loginButton = app.buttons["loginButton"] | |
| loginButton.tap() | |
| let messageText = app.staticTexts["messageText"] | |
| XCTAssertEqual(messageText.label, "Required fields are missing") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment