Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Jul 15, 2024
1 parent 81d7d8f commit ad8d163
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ extension WysiwygUITests {
}

changeKeyboardButton.press(forDuration: 1)
var keyboardSelection = app.tables.staticTexts[keyboard.label]
let keyboardSelection = app.tables.staticTexts[keyboard.label]
if !keyboardSelection.exists {
addKeyboardToSettings(keyboard: keyboard)
// No need to tap since it gets selected automatically
Expand All @@ -178,10 +178,12 @@ extension WysiwygUITests {
}
}

/// returns true if the keyboard has been added, otherwise if already present will return false
/// returns true if the keyboard has been added, otherwise if already present will return false
@discardableResult
private func addKeyboardToSettings(keyboard: TestKeyboard) -> Bool {
let settingsApp = XCUIApplication(bundleIdentifier: "com.apple.Preferences")
// In case it was already open
settingsApp.terminate()
settingsApp.launch()

settingsApp.tables.cells.staticTexts["General"].tap()
Expand Down

0 comments on commit ad8d163

Please sign in to comment.