fix(perception): correct device hierarchy method and add TDD guard

- Fixed AttributeError where device.get_hierarchy() was called instead of dump_hierarchy()
- Replaced MagicMock with a real DummyDeviceForKeyboardTest in E2E tests to adhere to the strict mock ban policy.
- Verified TelepathicEngine actively calls device.back() when keyboard is open on non-typing intents.
This commit is contained in:
2026-05-04 10:27:34 +02:00
parent 59ba330029
commit a67072eec4
2 changed files with 63 additions and 1 deletions

View File

@@ -96,7 +96,7 @@ class TelepathicEngine:
device.back()
time.sleep(1.0)
# Re-fetch UI state
xml_string = device.get_hierarchy()
xml_string = device.dump_hierarchy()
if xml_string:
root = self._parser.parse(xml_string)
if root: