From 64218f98b40cfaa826be9d37f570ac083c006887 Mon Sep 17 00:00:00 2001 From: Patrick Metcalfe Date: Wed, 3 Jan 2018 23:34:26 -0600 Subject: [PATCH] quick fail on iPhone --- PanelKit UI Tests/PanelKit_UI_Tests.swift | 4 ++++ PanelKitTests/MainTests.swift | 6 +++++- PanelKitTests/StateTests.swift | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/PanelKit UI Tests/PanelKit_UI_Tests.swift b/PanelKit UI Tests/PanelKit_UI_Tests.swift index 06cf281..954c336 100644 --- a/PanelKit UI Tests/PanelKit_UI_Tests.swift +++ b/PanelKit UI Tests/PanelKit_UI_Tests.swift @@ -22,6 +22,10 @@ class PanelKit_UI_Tests: XCTestCase { XCUIApplication().launch() // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + + if UIDevice.current.userInterfaceIdiom == .phone { + XCTFail("Test does not work on an iPhone") + } } override func tearDown() { diff --git a/PanelKitTests/MainTests.swift b/PanelKitTests/MainTests.swift index 190447c..7f67e7d 100644 --- a/PanelKitTests/MainTests.swift +++ b/PanelKitTests/MainTests.swift @@ -29,7 +29,11 @@ class MainTests: XCTestCase { XCTAssertNotNil(navigationController.view) XCTAssertNotNil(viewController.view) - + + if UIDevice.current.userInterfaceIdiom == .phone { + continueAfterFailure = false + XCTFail("Test does not work on an iPhone") + } } override func tearDown() { diff --git a/PanelKitTests/StateTests.swift b/PanelKitTests/StateTests.swift index 9a81aab..4feada9 100644 --- a/PanelKitTests/StateTests.swift +++ b/PanelKitTests/StateTests.swift @@ -30,6 +30,9 @@ class StateTests: XCTestCase { XCTAssertNotNil(navigationController.view) XCTAssertNotNil(viewController.view) + if UIDevice.current.userInterfaceIdiom == .phone { + XCTFail("Test does not work on an iPhone") + } } override func tearDown() {