mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-27 00:48:12 +00:00
fix(tests): check_share helper for T2B1
[no changelog]
This commit is contained in:
parent
ddbb5e52d4
commit
7833fa5fd2
@ -267,8 +267,12 @@ def check_share(
|
|||||||
three rounds of `Select word X of Y` choices.
|
three rounds of `Select word X of Y` choices.
|
||||||
"""
|
"""
|
||||||
for _ in range(3):
|
for _ in range(3):
|
||||||
# Word position is the first number in the text
|
if debug.model is models.T2B1:
|
||||||
word_pos_match = re.search(r"\d+", debug.wait_layout().text_content())
|
# 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
|
assert word_pos_match is not None
|
||||||
word_pos = int(word_pos_match.group(0))
|
word_pos = int(word_pos_match.group(0))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user