Skip to content

Instantly share code, notes, and snippets.

@tjmaynes
Last active September 22, 2021 15:14
Show Gist options
  • Save tjmaynes/d97892581ee3e24d9a2cdb51d07c3548 to your computer and use it in GitHub Desktop.
Save tjmaynes/d97892581ee3e24d9a2cdb51d07c3548 to your computer and use it in GitHub Desktop.
import XCTest
class AwesomeAppUITests: XCTestCase {
func test_whenUserTapsThroughMoreThanTwoScreens_itShouldTakeThemToLastScreen() {
let app = XCUIApplication()
app.launch()
XCTAssertTrue(app.staticTexts["First screen"].exists)
app.buttons["Tap me!"].tap()
XCTAssertTrue(app.staticTexts["Second screen"].exists)
app.buttons["Tap me, again!"].tap()
XCTAssertTrue(app.staticTexts["Third screen"].exists)
app.buttons["One more time..."].tap()
XCTAssertTrue(app.staticTexts["Final screen"].exists)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment