We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe380f1 commit 3793d01Copy full SHA for 3793d01
1 file changed
_articles/swift-testing.md
@@ -0,0 +1,21 @@
1
+---
2
+layout: page
3
+title: Swift Testing
4
+lede: "Testing Swift applications for iOS"
5
6
+
7
+## XCTest
8
9
+### Verify an onboarding flow shows at first launch
10
11
+```swift
12
+@MainActor
13
+func testOnboardingShowsAtFirstLaunch() throws {
14
+ let app = XCUIApplication()
15
+ app.launchArguments = ["-\(UserDefaultsKeys.onboardingCompleted)", "NO"]
16
+ app.launch()
17
18
+ XCTAssertTrue(app.staticTexts["Some Onboarding Screen Text"].waitForExistence(timeout: 5)) // Wait for the first onboarding screen to show
19
+ XCTAssertTrue(app.buttons["The Next Button"].exists)
20
+}
21
+```
0 commit comments