feat(tests): sync received responses

to prevent "unexpected response to Initialize" errors
matejcik/global-layout-only3
matejcik 1 month ago
parent e153f03c8d
commit c1faedf872

@ -231,6 +231,7 @@ def client(
_raw_client.reset_debug_features()
_raw_client.open()
try:
_raw_client.sync_responses()
_raw_client.init_device()
except Exception:
request.session.shouldstop = "Failed to communicate with Trezor"

@ -61,6 +61,7 @@ def screen_recording(
yield
finally:
client.ensure_open()
client.sync_responses()
# Wait for response to Initialize, which gives the emulator time to catch up
# and redraw the homescreen. Otherwise there's a race condition between that
# and stopping recording.

Loading…
Cancel
Save