From 1bd00552a4e89864344047cf7bd0bc68d3ab3f51 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Mon, 30 Jan 2023 10:06:19 +0100 Subject: [PATCH] CI: UITest for crash recoverability (#2666) Created a ui test for iOS-Swift sample that press the crash button and try to open the app again. If we introduce any error in the crash report process this test may identify it. --- Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift b/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift index 07e8df9a24a..9e0b278976f 100644 --- a/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift +++ b/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift @@ -20,6 +20,15 @@ class LaunchUITests: XCTestCase { super.tearDown() } + func testCrashRecovery() { + app.buttons["crash"].tap() + if app.buttons["crash"].exists { + XCTFail("App did not crashed") + } + app.launch() + waitForExistenseOfMainScreen() + } + func testBreadcrumbData() { let breadcrumbLabel = app.staticTexts["breadcrumbLabel"] breadcrumbLabel.waitForExistence("Breadcrumb label not found.")