-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49aa7a3
commit 0d5fee8
Showing
11 changed files
with
155 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// This source file is part of the Stanford HealthGPT project | ||
// | ||
// SPDX-FileCopyrightText: 2023 Stanford University & Project Contributors (see CONTRIBUTORS.md) | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
|
||
import XCTest | ||
import XCTestExtensions | ||
|
||
|
||
final class HealthGPTViewUITests: XCTestCase { | ||
override func setUpWithError() throws { | ||
try super.setUpWithError() | ||
continueAfterFailure = false | ||
|
||
let app = XCUIApplication() | ||
app.launchArguments = ["--showOnboarding", "--resetKeychain"] | ||
app.deleteAndLaunch(withSpringboardAppName: "HealthGPT") | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
try super.tearDownWithError() | ||
} | ||
|
||
func testTextToSpeechToggle() throws { | ||
let app = XCUIApplication() | ||
try app.conductOnboardingIfNeeded() | ||
|
||
let ttsButton = app.buttons["textToSpeechButton"] | ||
XCTAssertTrue(ttsButton.waitForExistence(timeout: 5)) | ||
|
||
XCTAssertEqual(ttsButton.label, "Text to speech is disabled, press to enable text to speech.") | ||
ttsButton.tap() | ||
XCTAssertEqual(ttsButton.label, "Text to speech is enabled, press to disable text to speech.") | ||
} | ||
|
||
func testSettingsView() throws { | ||
let app = XCUIApplication() | ||
try app.conductOnboardingIfNeeded() | ||
|
||
let settingsButton = app.buttons["settingsButton"] | ||
XCTAssertTrue(settingsButton.waitForExistence(timeout: 5)) | ||
settingsButton.tap() | ||
|
||
let clearThreadButton = app.buttons["clearThreadButton"] | ||
XCTAssertTrue(clearThreadButton.waitForExistence(timeout: 5)) | ||
clearThreadButton.tap() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters