Skip to content

Instantly share code, notes, and snippets.

@AviTsadok
Last active July 23, 2019 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AviTsadok/88c8f5a23b931c92b4e2226ccd22ad55 to your computer and use it in GitHub Desktop.
Save AviTsadok/88c8f5a23b931c92b4e2226ccd22ad55 to your computer and use it in GitHub Desktop.
Main Screen UI Test
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