tests: fix small irregularities

pull/3686/merge^2
matejcik 7 months ago
parent 3ee850caa9
commit 3d379792f8

@ -76,8 +76,7 @@ def test_hold_to_lock(device_handler: "BackgroundDeviceHandler"):
# unlock by touching
if debug.model in (models.T2B1,):
# Doing a short HTC to simulate a click
layout = debug.press_right(hold_ms=100)
layout = debug.press_right()
else:
layout = debug.click(buttons.INFO)
assert "PinKeyboard" in layout.all_components()

@ -853,15 +853,15 @@ class InputFlowSignTxInformationReplacement(InputFlowBase):
yield # confirm txid
self.debug.press_right()
self.debug.press_right()
yield # confirm address
yield # modify amount - address
self.debug.press_right()
self.debug.press_right()
yield # modify amount - amount
self.debug.press_right()
yield # confirm amount
yield # modify fee
self.debug.press_right()
self.debug.press_right()
self.debug.press_right()
yield
def input_flow_t3t1(self) -> BRGeneratorType:
yield # confirm txid

@ -241,14 +241,12 @@ class RecoveryFlow:
if has_groups:
yield from self.success_share_group_entered()
if self.client.model in (models.T2T1, models.T3T1) and click_info:
yield from self.tt_click_info()
yield
self.tt_click_info()
yield from self.success_more_shares_needed()
def tt_click_info(
self,
) -> BRGeneratorType:
def tt_click_info(self) -> None:
# Moving through the INFO button
yield
self.debug.press_info()
self.debug.swipe_up()
self.debug.press_yes()

@ -1,5 +1,6 @@
from trezorlib import debuglink, device, messages
from trezorlib.debuglink import TrezorClientDebugLink as Client
from trezorlib.debuglink import message_filters
from ..common import MNEMONIC12
from ..emulators import Emulator, EmulatorWrapper
@ -48,7 +49,8 @@ def test_wipe_code_activate_core(core_emulator: Emulator):
ret = core_emulator.client.call_raw(messages.ButtonAck())
# Enter the wipe code instead of the current PIN
assert ret == messages.ButtonRequest(code=messages.ButtonRequestType.PinEntry)
expected = message_filters.ButtonRequest(code=messages.ButtonRequestType.PinEntry)
assert expected.match(ret)
core_emulator.client._raw_write(messages.ButtonAck())
core_emulator.client.debug.input(WIPE_CODE)

Loading…
Cancel
Save