Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request #17 from pducks32/fail-fast-iphone
Browse files Browse the repository at this point in the history
quick fail on iPhone
  • Loading branch information
louisdh authored Jan 4, 2018
2 parents 29b4623 + 64218f9 commit 7a07666
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions PanelKit UI Tests/PanelKit_UI_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 5 additions & 1 deletion PanelKitTests/MainTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions PanelKitTests/StateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 7a07666

Please sign in to comment.