feat: improve AT-SPI labeling
This commit is contained in:
@@ -30,6 +30,12 @@ class AccessibilityTests(unittest.TestCase):
|
||||
def test_center(self):
|
||||
self.assertEqual(accessibility.resolve_target(self.saved, self.current, "abc", "1", 800, 600), (60, 40))
|
||||
|
||||
def test_target_with_states_and_value(self):
|
||||
target_with_states = {**self.target, "states": ["focused", "editable"], "value": "test text"}
|
||||
saved = {"observationId": "abc", "size": [800, 600], "targets": [target_with_states]}
|
||||
current = {"targets": [target_with_states]}
|
||||
self.assertEqual(accessibility.resolve_target(saved, current, "abc", "1", 800, 600), (60, 40))
|
||||
|
||||
def test_stale_and_missing(self):
|
||||
for observation, target, width in [("old", "1", 800), ("abc", "2", 800), ("abc", "1", 900)]:
|
||||
with self.assertRaises(ValueError):
|
||||
|
||||
Reference in New Issue
Block a user