Skip to content

Commit 5ff2aee

Browse files
Fix failing unit test. Need to switch back to UIApp from Safari.
1 parent 8e909e5 commit 5ff2aee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Tests/ui-tests/UITests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ class UITests: XCTestCase {
5858

5959
// Give some time to open
6060
sleep(1)
61+
62+
// Assert that Safari is Active
63+
let safariApp = XCUIApplication(bundleIdentifier: "com.apple.mobilesafari")
64+
XCTAssertEqual(safariApp.state, .runningForeground, "Safari is not active")
65+
66+
// launch this app again for other tests
67+
app.launch()
6168
}
6269

6370
func testShowSystemNotification() {

0 commit comments

Comments
 (0)