Skip to content

Commit

Permalink
Don't check for keyboard appearing on catalyst (#21)
Browse files Browse the repository at this point in the history
# Don't check for keyboard appearing on catalyst

## ♻️ Current situation & Problem
For our text entry implementation, we currently maintain a special check
for `macOS` to not check for keyboard existence (as there is no UI
keyboard don macOS). This check currently isn't used on the catalyst
platform. This PR fixes that for macOS Catalyst as well.


## ⚙️ Release Notes 
* Fix text entry for macOS catalyst builds


## 📚 Documentation
-- 


## ✅ Testing
--


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
Supereg authored Feb 22, 2024
1 parent e29d29d commit 1fe9b8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/XCTestExtensions/XCUIElement+TextEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ extension XCUIElement {
#if os(visionOS)
tap()
_ = app.visionOSKeyboard.waitForExistence(timeout: 2.0) // this will always succeed
#elseif os(macOS)
#elseif os(macOS) || targetEnvironment(macCatalyst)
// this should hit the keyboard most likely. The `.keyboard` query doesn't exist on macOS.
coordinate(withNormalizedOffset: CGVector(dx: 0.95, dy: 0.5)).tap()
#else
Expand Down

0 comments on commit 1fe9b8e

Please sign in to comment.