Last active
July 23, 2019 17:30
-
-
Save AviTsadok/88c8f5a23b931c92b4e2226ccd22ad55 to your computer and use it in GitHub Desktop.
Main Screen UI Test
This file contains 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
import XCTest | |
class MainScreenTests: XCTestCase { | |
override func setUp() { | |
continueAfterFailure = false | |
let app = XCUIApplication() | |
app.launchArguments.append("-mockServer") // launch the app with mock server argument | |
app.launch() | |
} | |
func testAddingTask() { | |
let startUpScreen = AppWelcomeScreen() // this is the start up page | |
let signupPage = startUpScreen.pressTheLoginButton() // pressing the login button on the startup page, leads us to the sign up page | |
let onboarding = signupPage.doSignIn(email: "avitsadok@me.com", password: "123456") // we do sign in with email passowrd | |
let mainScreen = onboarding.pressSkipButton() //tapping the skip button on the onboarding screen | |
mainScreen.validateScreen() // verify we are on the main screen | |
} | |
// or event the short version! | |
func testAddingTaskShort() { | |
let mainScreen = AppWelcomeScreen().pressTheLoginButton().doSignIn(email: "avitsadok@me.com", password: "123456") | |
.getSkipButton() | |
mainScreen.validateScreen() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment