From 7833fa5fd26e8253d38270ee22e1bf03053082cc Mon Sep 17 00:00:00 2001 From: obrusvit Date: Wed, 22 May 2024 15:45:49 +0200 Subject: [PATCH] fix(tests): check_share helper for T2B1 [no changelog] --- tests/common.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/common.py b/tests/common.py index c3f45e48cb..0d4c2cf137 100644 --- a/tests/common.py +++ b/tests/common.py @@ -267,8 +267,12 @@ 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 - word_pos_match = re.search(r"\d+", debug.wait_layout().text_content()) + 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))