mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-26 00:18:15 +00:00
test(core): fix waiting for recovery
[no changelog]
This commit is contained in:
parent
e8044df48c
commit
0c2ff24398
@ -55,8 +55,10 @@ def enter_word(
|
|||||||
|
|
||||||
|
|
||||||
def confirm_recovery(debug: "DebugLink", title: str = "recovery__title") -> None:
|
def confirm_recovery(debug: "DebugLink", title: str = "recovery__title") -> None:
|
||||||
layout = debug.read_layout()
|
expected_title = TR.translate(title)
|
||||||
assert TR.translate(title) == layout.title()
|
# exlicitly wait, in case the recovery was started asynchronously (e.g. using BackgroundDeviceHandler)
|
||||||
|
layout = debug.synchronize_at(expected_title)
|
||||||
|
assert expected_title == layout.title()
|
||||||
if debug.layout_type in (LayoutType.Bolt, LayoutType.Eckhart):
|
if debug.layout_type in (LayoutType.Bolt, LayoutType.Eckhart):
|
||||||
debug.click(debug.screen_buttons.ok())
|
debug.click(debug.screen_buttons.ok())
|
||||||
elif debug.layout_type is LayoutType.Delizia:
|
elif debug.layout_type is LayoutType.Delizia:
|
||||||
|
Loading…
Reference in New Issue
Block a user