Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0c committed Oct 1, 2020
1 parent 3cbe9bc commit bba190c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
Binary file modified .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions Examples/Example/Snapshot Tests/BaseSnapshotTestCase.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2018-present Frédéric Maquin <fred@ephread.com> and contributors.
// Licensed under the terms of the MIT License.

#if targetEnvironment(macCatalyst)
#else
import Foundation

@testable import Instructions
Expand Down Expand Up @@ -40,3 +42,4 @@ class BaseSnapshotTests: FBSnapshotTestCase {
}.first
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2018-present Frédéric Maquin <fred@ephread.com> and contributors.
// Licensed under the terms of the MIT License.

#if targetEnvironment(macCatalyst)
#else
@testable import Instructions
@testable import InstructionsExample
import FBSnapshotTestCase
Expand Down Expand Up @@ -142,3 +144,4 @@ class DefaultExampleSnapshotTests: BaseSnapshotTests,
}
}
}
#endif
11 changes: 9 additions & 2 deletions Examples/Example/UI Tests/TransitionExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@
import XCTest

class TransitionExampleTests: XCTestCase {

#if targetEnvironment(macCatalyst)
#else
let originalOrientation = XCUIDevice.shared.orientation

#endif
override func setUp() {
super.setUp()
continueAfterFailure = false

XCUIApplication().launchWithAnimationsDisabled()
#if targetEnvironment(macCatalyst)
#else
XCUIDevice.shared.orientation = .portrait
#endif
}

override func tearDown() {
super.tearDown()
#if targetEnvironment(macCatalyst)
#else
XCUIDevice.shared.orientation = originalOrientation
#endif
}

func testTapThroughCutout() {
Expand Down
13 changes: 8 additions & 5 deletions Examples/Instructions Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
5B84A3AE1BF48BE200C795F8 /* OnlyHintsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B84A3AD1BF48BE200C795F8 /* OnlyHintsViewController.swift */; };
B6105E392434FEC600B45CDA /* XCUIApplication+Launch.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6105E372434FE9E00B45CDA /* XCUIApplication+Launch.swift */; };
B6105E3C2435123D00B45CDA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6105E3E2435123D00B45CDA /* Localizable.strings */; };
B618494220C2472200315E1C /* PausingCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B618494120C2472100315E1C /* PausingCodeViewController.swift */; };
B639B28D20D4E7AA009996CF /* DefaultExampleSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6C9D6A020D4103700EBC03A /* DefaultExampleSnapshotTests.swift */; };
B639B28E20D4E7CA009996CF /* FBSnapshotTestCase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C9D69A20D40DFD00EBC03A /* FBSnapshotTestCase.framework */; };
B639B29120D4E829009996CF /* BaseSnapshotTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = B639B28F20D4E807009996CF /* BaseSnapshotTestCase.swift */; };
B639B28D20D4E7AA009996CF /* DefaultExampleSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6C9D6A020D4103700EBC03A /* DefaultExampleSnapshotTests.swift */; platformFilter = ios; };
B639B28E20D4E7CA009996CF /* FBSnapshotTestCase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6C9D69A20D40DFD00EBC03A /* FBSnapshotTestCase.framework */; platformFilter = ios; settings = {ATTRIBUTES = (Required, ); }; };
B639B29120D4E829009996CF /* BaseSnapshotTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = B639B28F20D4E807009996CF /* BaseSnapshotTestCase.swift */; platformFilter = ios; };
B6454D6220C78C2A00DCF351 /* LargeCutoutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6454D5F20C78C2900DCF351 /* LargeCutoutViewController.swift */; };
B65DDDC21EE2C5F1002618AF /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65DDDC11EE2C5F1002618AF /* Extensions.swift */; };
B65DDDD41EE2EED0002618AF /* KeyboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65DDDD31EE2EED0002618AF /* KeyboardViewController.swift */; };
Expand Down Expand Up @@ -49,7 +49,7 @@
B6CA4A9720BEBB53006F42AC /* CustomExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6CA4A9620BEBB53006F42AC /* CustomExampleTests.swift */; };
B6CA4A9920BEC111006F42AC /* AccessibilityIdentifiers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6CA4A9820BEC111006F42AC /* AccessibilityIdentifiers.swift */; };
B6CA4A9B20BED19B006F42AC /* TransitionExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6CA4A9A20BED19B006F42AC /* TransitionExampleTests.swift */; };
B6F2327823484DFF00040090 /* FBSnapshotTestCase.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B6C9D69A20D40DFD00EBC03A /* FBSnapshotTestCase.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B6F2327823484DFF00040090 /* FBSnapshotTestCase.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B6C9D69A20D40DFD00EBC03A /* FBSnapshotTestCase.framework */; platformFilter = ios; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
C615FBAF1D7A1BB500EAEEFB /* TestFlowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C615FBAE1D7A1BB500EAEEFB /* TestFlowViewController.swift */; };
C636FFAA1BBBD99200EB243B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C636FFA91BBBD99200EB243B /* Assets.xcassets */; };
C636FFB11BBC329600EB243B /* TransparentCoachMarkArrowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C636FFAF1BBC329600EB243B /* TransparentCoachMarkArrowView.swift */; };
Expand Down Expand Up @@ -206,6 +206,7 @@
C6CE542B1BBD435500154266 /* DefaultViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultViewController.swift; sourceTree = "<group>"; };
C6CE542F1BBD43CB00154266 /* DelegateViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelegateViewController.swift; sourceTree = "<group>"; };
C6CE54301BBD43CB00154266 /* MixedCoachMarksViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MixedCoachMarksViewController.swift; sourceTree = "<group>"; };
E93D21882525BCD900B3A315 /* InstructionsExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = InstructionsExample.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -512,6 +513,7 @@
C64FB3031BB6CB1C0081E5B6 = {
isa = PBXGroup;
children = (
E93D21882525BCD900B3A315 /* InstructionsExample.entitlements */,
B6C9D69120D40BDA00EBC03A /* Frameworks */,
C64FB30D1BB6CB1C0081E5B6 /* Products */,
C64FB32C1BB6CC180081E5B6 /* Sources */,
Expand Down Expand Up @@ -844,6 +846,7 @@
/* Begin PBXTargetDependency section */
B639B28720D4E71D009996CF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
platformFilter = ios;
target = C64FB30B1BB6CB1C0081E5B6 /* InstructionsExample */;
targetProxy = B639B28620D4E71D009996CF /* PBXContainerItemProxy */;
};
Expand Down

0 comments on commit bba190c

Please sign in to comment.