Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellanata committed Sep 21, 2024
1 parent f2468b9 commit 6d4d9ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion Sources/Hammer/Utilties/HammerWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ extension UIWindow {
}
}


@available(iOS 13.0, *)
private extension UIScene {
static var mainOrFirstConnectedScene: UIWindowScene? {
Expand Down
5 changes: 4 additions & 1 deletion Tests/HammerTests/KeyboardTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,11 @@ final class KeyboardTests: XCTestCase {
view.centerXAnchor.constraint(equalTo: viewController.view.centerXAnchor),
])

let window = UIWindow(wrapping: viewController)
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = viewController
window.addToMainSceneIfNeeded()
window.isHidden = false
defer { window.removeFromScene() }

let eventGenerator = try EventGenerator(window: window)
try eventGenerator.waitUntilHittable(timeout: 1)
Expand Down

0 comments on commit 6d4d9ee

Please sign in to comment.