What changed, and why it matters
This commit only changes a test file. It adds a helper function to scroll through multi-page on-screen messages during automated PIN and wipe-code setup tests. There is no change to the actual Trezor firmware or wallet behavior, so it does not create or fix a security vulnerability in the product users rely on.
No security action needed. Treat as a normal test-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies tests/click_tests/test_pin.py. It introduces scroll_through_pages() and calls it after synchronize_at() for PIN setup and wipe-code setup flows. The purpose is to advance through paginated informational screens before proceeding with the test. This is a test-harness adjustment, not a firmware change.
Changed components
tests/click_tests/test_pin.pyInspect captured patch +14 / −2
diff --git a/tests/click_tests/test_pin.py b/tests/click_tests/test_pin.py
index b9a7f3da..fe90ba54 100644
--- a/tests/click_tests/test_pin.py
+++ b/tests/click_tests/test_pin.py
@@ -77,6 +77,14 @@ class Situation(Enum):
PIN_INPUT_CANCEL = 5
+def scroll_through_pages(page_count, debug):
+ for _ in range(page_count - 1):
+ if debug.layout_type is LayoutType.Eckhart:
+ debug.click(debug.screen_buttons.ok())
+ else:
+ debug.swipe_up()
+
+
@contextmanager
def prepare(
device_handler: "BackgroundDeviceHandler",
@@ -101,7 +109,10 @@ def prepare(
elif situation == Situation.PIN_SETUP:
# Set new PIN
device_handler.run_with_provided_session(device_handler.client.get_seedless_session(), device.change_pin) # type: ignore
- debug.synchronize_at([TR.pin__turn_on, TR.pin__info, TR.pin__title_settings])
+ pin_turn_on = debug.synchronize_at(
+ [TR.pin__turn_on, TR.pin__info, TR.pin__title_settings]
+ )
+ scroll_through_pages(pin_turn_on.page_count(), debug)
if debug.layout_type in (
LayoutType.Bolt,
LayoutType.Delizia,
@@ -129,9 +140,10 @@ def prepare(
if old_pin:
_assert_pin_entry(debug)
_input_see_confirm(debug, old_pin)
- debug.synchronize_at(
+ wipe_code_info = debug.synchronize_at(
[TR.wipe_code__turn_on, TR.wipe_code__info, TR.wipe_code__title_settings]
)
+ scroll_through_pages(wipe_code_info.page_count(), debug)
go_next(debug)
if debug.layout_type is LayoutType.Caesar:
go_next(debug)
Why this scored 13/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.