From 0cc82843ac9255a8cd3288f767c921cf7af9927f Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Thu, 21 Apr 2022 12:00:57 +0200 Subject: [PATCH] tests --- Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift | 10 +++++++++- Tests/SentryTests/SentryScreenShotTests.swift | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift b/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift index eb25996be30..b921f6a3d2d 100644 --- a/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift +++ b/Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift @@ -35,7 +35,15 @@ class LaunchUITests: XCTestCase { XCTAssertTrue(app.buttons["lonelyButton"].waitForExistence(), "Nib ViewController not loaded.") assertApp() } - + + func testCaptureError() { + app.buttons["Error"].tap() + } + + func testCaptureException() { + app.buttons["NSException"].tap() + } + func testShowTableView() { app.buttons["showTableViewButton"].tap() XCTAssertTrue(app.navigationBars.buttons.element(boundBy: 0).waitForExistence(), "TableView not loaded.") diff --git a/Tests/SentryTests/SentryScreenShotTests.swift b/Tests/SentryTests/SentryScreenShotTests.swift index 34e3be71584..55a28697848 100644 --- a/Tests/SentryTests/SentryScreenShotTests.swift +++ b/Tests/SentryTests/SentryScreenShotTests.swift @@ -25,7 +25,7 @@ class SentryScreenShotTests: XCTestCase { } func test_IsMainThread() { - let testWindow = TestWindow() + let testWindow = TestWindow(frame: CGRect(x: 0, y: 0, width: 10, height: 10)) var isMainThread = false testWindow.onDrawHierarchy = { @@ -47,8 +47,8 @@ class SentryScreenShotTests: XCTestCase { } func test_Draw_Each_Window() { - let firstWindow = TestWindow() - let secondWindow = TestWindow() + let firstWindow = TestWindow(frame: CGRect(x: 0, y: 0, width: 10, height: 10)) + let secondWindow = TestWindow(frame: CGRect(x: 0, y: 0, width: 10, height: 10)) var drawFirstWindow = false var drawSecondWindow = false