diff --git a/Passepartout/UITests/Extensions/XCTestCase+Extensions.swift b/Passepartout/UITests/Extensions/XCTestCase+Extensions.swift index 6a047e9a..263b62ac 100644 --- a/Passepartout/UITests/Extensions/XCTestCase+Extensions.swift +++ b/Passepartout/UITests/Extensions/XCTestCase+Extensions.swift @@ -88,7 +88,7 @@ extension XCUIApplicationProviding where Self: XCTestCase { } private func container(for target: ScreenshotTarget) -> XCUIElement { -#if os(iOS) +#if os(iOS) || os(tvOS) app.windows.firstMatch #else switch target { diff --git a/Passepartout/UITests/Extensions/XCUIElement+Extensions.swift b/Passepartout/UITests/Extensions/XCUIElement+Extensions.swift index 19881b03..1a19a83e 100644 --- a/Passepartout/UITests/Extensions/XCUIElement+Extensions.swift +++ b/Passepartout/UITests/Extensions/XCUIElement+Extensions.swift @@ -42,14 +42,14 @@ extension XCUIElement { private extension XCUIElement { func query(for elementType: AccessibilityInfo.ElementType) -> XCUIElementQuery { -#if os(iOS) +#if os(iOS) || os(tvOS) switch elementType { case .button, .link, .menu, .menuItem: return buttons case .text: return staticTexts } -#elseif os(macOS) +#else switch elementType { case .button, .link: return buttons @@ -60,13 +60,6 @@ private extension XCUIElement { case .text: return staticTexts } -#else - switch elementType { - case .button, .link, .menu, .menuItem: - return buttons - case .text: - return staticTexts - } #endif } }