Skip to content

Commit 7d1b904

Browse files
committed
Fix Tests
1 parent f9e7dea commit 7d1b904

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CS342ExampleApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CS342ExampleApplicationUITests/OnboardingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ extension XCUIApplication {
100100
buttons["Logout"].tap()
101101
}
102102

103-
XCTAssertTrue(buttons["Signup"].exists)
103+
XCTAssertTrue(buttons["Signup"].waitForExistence(timeout: 2))
104104
buttons["Signup"].tap()
105105

106106

CS342ExampleApplicationUITests/SchedulerTests.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SchedulerTests: XCTestCase {
2020
app.deleteAndLaunch(withSpringboardAppName: "CS342ExampleApplication")
2121
}
2222

23-
23+
2424
@MainActor
2525
func testScheduler() throws {
2626
let app = XCUIApplication()
@@ -61,6 +61,13 @@ class SchedulerTests: XCTestCase {
6161
XCTAssert(app.staticTexts["E-mail"].exists)
6262
app.staticTexts["E-mail"].tap()
6363

64+
XCTAssert(nextButton.isEnabled)
65+
nextButton.tap()
66+
67+
// staticTexts["What is your e-mail?"] is not exposed in the accessibility hierarchy; it seems like a bug in ResearchKit.
68+
XCTAssert(app.textFields["Tap to answer"].exists)
69+
try app.textFields["Tap to answer"].enter(value: "[email protected]")
70+
6471
XCTAssert(nextButton.isEnabled)
6572
nextButton.tap()
6673

0 commit comments

Comments
 (0)