Created
December 3, 2017 04:10
-
-
Save azamsharp/84a81b2225e03351d102d671529566b2 to your computer and use it in GitHub Desktop.
Register For a new Account Test
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
class When_User_Is_Registering_For_A_New_Account: XCTestCase { | |
private var app :XCUIApplication! | |
override func setUp() { | |
super.setUp() | |
continueAfterFailure = false | |
self.app = XCUIApplication() | |
self.app.launch() | |
} | |
func test_should_create_account_successfully() { | |
app.textFields["usernameTextField"].tapAndType(text: "johndoe") | |
app.textFields["passwordTextField"].tapAndType(text: "password") | |
app.buttons["registerButton"].tap() // writes a user default value to users | |
// go to the login screen if the login is successfull | |
XCTAssertEqual("Login", app.navigationBars.element.identifier) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment