Skip to content

Commit 21f48d7

Browse files
committed
Adds UI tests.
1 parent 053fffb commit 21f48d7

File tree

3 files changed

+64
-12
lines changed

3 files changed

+64
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ notifications:
99
install: true
1010

1111
script:
12-
- mkdir -p build && . ./scripts/common.sh && rx "Tests" Release "${DEFAULT_IOS_SIMULATOR}" test && set +e
12+
- mkdir -p build && . ./scripts/common.sh && rx "Tests" Release "${DEFAULT_IOS_SIMULATOR}" test && rx "ExampleUITests" Release "${DEFAULT_IOS_SIMULATOR}" test && set +e
1313

1414
after_success:
1515
- sleep 5 # workaround https://github.com/travis-ci/travis-ci/issues/4725

ExampleUITests/ExampleUITests.swift

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,21 @@ class ExampleUITests: XCTestCase {
1313

1414
override func setUp() {
1515
super.setUp()
16-
17-
// Put setup code here. This method is called before the invocation of each test method in the class.
18-
19-
// In UI tests it is usually best to stop immediately when a failure occurs.
16+
2017
continueAfterFailure = false
21-
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
2218
XCUIApplication().launch()
23-
24-
// 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.
2519
}
26-
20+
2721
override func tearDown() {
28-
// Put teardown code here. This method is called after the invocation of each test method in the class.
2922
super.tearDown()
3023
}
3124

3225
func testExample() {
33-
// Use recording to get started writing UI tests.
34-
// Use XCTAssert and related functions to verify your tests produce the correct results.
26+
XCUIApplication().tables.element(boundBy: 0).cells.staticTexts["Randomize Example"].tap()
27+
28+
let time: TimeInterval = 120.0
29+
30+
RunLoop.current.run(until: Date().addingTimeInterval(time))
3531
}
3632

3733
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0810"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "C8984CB01C36B723001E4272"
20+
BuildableName = "ExampleUITests.xctest"
21+
BlueprintName = "ExampleUITests"
22+
ReferencedContainer = "container:RxDataSources.xcodeproj">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
<AdditionalOptions>
27+
</AdditionalOptions>
28+
</TestAction>
29+
<LaunchAction
30+
buildConfiguration = "Debug"
31+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
32+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
33+
launchStyle = "0"
34+
useCustomWorkingDirectory = "NO"
35+
ignoresPersistentStateOnLaunch = "NO"
36+
debugDocumentVersioning = "YES"
37+
debugServiceExtension = "internal"
38+
allowLocationSimulation = "YES">
39+
<AdditionalOptions>
40+
</AdditionalOptions>
41+
</LaunchAction>
42+
<ProfileAction
43+
buildConfiguration = "Release"
44+
shouldUseLaunchSchemeArgsEnv = "YES"
45+
savedToolIdentifier = ""
46+
useCustomWorkingDirectory = "NO"
47+
debugDocumentVersioning = "YES">
48+
</ProfileAction>
49+
<AnalyzeAction
50+
buildConfiguration = "Debug">
51+
</AnalyzeAction>
52+
<ArchiveAction
53+
buildConfiguration = "Release"
54+
revealArchiveInOrganizer = "YES">
55+
</ArchiveAction>
56+
</Scheme>

0 commit comments

Comments
 (0)