import XCTest final class StepNavigationTests: XCTestCase { override func setUp() { continueAfterFailure = false } func testCupOpensAtStepOne() { let app = XCUIApplication(); app.launch() app.buttons["Cup"].tap() XCTAssertEqual(app.staticTexts["step.index"].label, "1") } func testStepNeverAdvancesWithoutTheUserCompletingTheFold() { let app = XCUIApplication(); app.launch() app.buttons["Cup"].tap() sleep(3) XCTAssertEqual(app.staticTexts["step.index"].label, "1") } func testTheDiagramIsCaptionedWithTheStepsInstruction() { let app = XCUIApplication(); app.launch() app.buttons["Cup"].tap() XCTAssertTrue(app.staticTexts["diagram.caption"].label.hasPrefix("Valley fold")) } }