1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

fix(tests): check_share helper for T2B1

[no changelog]
This commit is contained in:
obrusvit 2024-05-22 15:45:49 +02:00 committed by Martin Milata
parent 250593125c
commit 4d462e48f0

View File

@ -272,7 +272,11 @@ def check_share(
three rounds of `Select word X of Y` choices.
"""
for _ in range(3):
# Word position is the first number in the text
if debug.model is models.T2B1:
# T2B1 has the instruction in the title
word_pos_match = re.search(r"\d+", debug.wait_layout().title())
else:
# Other models has position as the first number in the text
word_pos_match = re.search(r"\d+", debug.wait_layout().text_content())
assert word_pos_match is not None
word_pos = int(word_pos_match.group(0))