Skip to content

Commit 279ccef

Browse files
committed
test(ios): the focus reader test covers an object exposing only the focus engine's key
1 parent 2ff4dcf commit 279ccef

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+TvRemoteTests.swift‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ extension RunnerTests {
3939
focusBool(KeyboardFocusOnlyFixture()),
4040
"an object that exposes no hasFocus key at all still reports its keyboard focus"
4141
)
42+
XCTAssertTrue(
43+
focusBool(NativeFocusOnlyFixture()),
44+
"an object that exposes no hasKeyboardFocus key at all still reports the focus engine's focus"
45+
)
4246
XCTAssertFalse(focusBool(NSObject()), "an object with neither key reads as unfocused, not as an exception")
4347
}
4448
}
@@ -57,4 +61,8 @@ private final class FocusFixture: NSObject {
5761
private final class KeyboardFocusOnlyFixture: NSObject {
5862
@objc let hasKeyboardFocus: NSNumber = true
5963
}
64+
65+
private final class NativeFocusOnlyFixture: NSObject {
66+
@objc let hasFocus: NSNumber = true
67+
}
6068
#endif

0 commit comments

Comments
 (0)