From 0c2ff24398b8b44740b05cc1bb9af821e309fc84 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 10 Jul 2025 14:35:06 +0300 Subject: [PATCH] test(core): fix waiting for recovery [no changelog] --- tests/click_tests/recovery.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/click_tests/recovery.py b/tests/click_tests/recovery.py index 3fefb6a641..995d7611e2 100644 --- a/tests/click_tests/recovery.py +++ b/tests/click_tests/recovery.py @@ -55,8 +55,10 @@ def enter_word( def confirm_recovery(debug: "DebugLink", title: str = "recovery__title") -> None: - layout = debug.read_layout() - assert TR.translate(title) == layout.title() + expected_title = TR.translate(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): debug.click(debug.screen_buttons.ok()) elif debug.layout_type is LayoutType.Delizia: