Skip to content

Commit

Permalink
Update UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuravi committed Apr 4, 2024
1 parent 9a30837 commit ad5196c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion HealthGPT/Onboarding/LLMSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import Foundation
import SpeziLLMOpenAI


enum LLMSource: String, CaseIterable, Identifiable, Codable {
Expand Down
10 changes: 9 additions & 1 deletion HealthGPTUITests/OnboardingUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,16 @@ extension XCUIApplication {

let picker = pickers["llmSourcePicker"]
let optionToSelect = picker.pickerWheels.element(boundBy: 0)
optionToSelect.adjust(toPickerWheelValue: "Open AI LLM")
optionToSelect.adjust(toPickerWheelValue: "On-device LLM")

XCTAssertTrue(buttons["Save Choice"].waitForExistence(timeout: 5))
buttons["Save Choice"].tap()

XCTAssertTrue(staticTexts["LLM Download"].waitForExistence(timeout: 5))
XCTAssertTrue(buttons["Back"].waitForExistence(timeout: 2))
buttons["Back"].tap()

optionToSelect.adjust(toPickerWheelValue: "Open AI LLM")
XCTAssertTrue(buttons["Save Choice"].waitForExistence(timeout: 5))
buttons["Save Choice"].tap()
}
Expand Down

0 comments on commit ad5196c

Please sign in to comment.