Created
August 2, 2020 10:50
-
-
Save cipolleschi/be7644db94507a59a2fde8405a0f41c6 to your computer and use it in GitHub Desktop.
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
| func testExample() throws { | |
| // UI tests must launch the application that they test. | |
| let app = XCUIApplication() | |
| app.launch() | |
| // Use recording to get started writing UI tests. | |
| // Use XCTAssert and related functions to verify your tests produce the correct results. | |
| let tosButton = app.buttons["legal_view.tos_button"] | |
| let privacyButton = app.buttons["legal_view.privacy_button"] | |
| let continueButton = app.buttons["legal_view.continue_button"] | |
| XCTAssertFalse(tosButton.isSelected) | |
| XCTAssertFalse(privacyButton.isSelected) | |
| XCTAssertFalse(continueButton.isEnabled) | |
| tosButton.tap() | |
| XCTAssertTrue(tosButton.isSelected) | |
| XCTAssertFalse(privacyButton.isSelected) | |
| XCTAssertFalse(continueButton.isEnabled) | |
| privacyButton.tap() | |
| XCTAssertTrue(tosButton.isSelected) | |
| XCTAssertTrue(privacyButton.isSelected) | |
| XCTAssertTrue(continueButton.isEnabled) | |
| continueButton.tap() | |
| XCTAssertTrue(app.otherElements["home_view"].exists) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment