mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-11 23:22:50 +00:00
fixup! test(core): don't fetch DebugLinkState
by default
This commit is contained in:
parent
a59d598f0e
commit
26ab041f47
@ -59,18 +59,6 @@ def go_next(debug: "DebugLink") -> LayoutContent:
|
||||
return debug.read_layout()
|
||||
|
||||
|
||||
def tap_to_confirm(debug: "DebugLink") -> LayoutContent:
|
||||
if debug.layout_type is LayoutType.Bolt:
|
||||
return debug.read_layout()
|
||||
elif debug.layout_type is LayoutType.Caesar:
|
||||
return debug.read_layout()
|
||||
elif debug.layout_type is LayoutType.Delizia:
|
||||
debug.click(buttons.TAP_TO_CONFIRM)
|
||||
return debug.read_layout()
|
||||
else:
|
||||
raise RuntimeError("Unknown model")
|
||||
|
||||
|
||||
def go_back(debug: "DebugLink", r_middle: bool = False) -> LayoutContent:
|
||||
if debug.layout_type in (LayoutType.Bolt, LayoutType.Delizia):
|
||||
debug.click(buttons.CANCEL)
|
||||
|
@ -30,7 +30,7 @@ from .. import translations as TR
|
||||
from ..device_tests.bitcoin.payment_req import make_coinjoin_request
|
||||
from ..tx_cache import TxCache
|
||||
from . import recovery
|
||||
from .common import go_next, tap_to_confirm, unlock_gesture
|
||||
from .common import go_next, unlock_gesture
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from trezorlib.debuglink import DebugLink, LayoutContent
|
||||
@ -71,7 +71,8 @@ def set_autolock_delay(device_handler: "BackgroundDeviceHandler", delay_ms: int)
|
||||
|
||||
layout = go_next(debug)
|
||||
if debug.layout_type is LayoutType.Delizia:
|
||||
layout = tap_to_confirm(debug)
|
||||
debug.click(buttons.TAP_TO_CONFIRM)
|
||||
layout = debug.read_layout()
|
||||
assert layout.main_component() == "Homescreen"
|
||||
device_handler.result()
|
||||
|
||||
|
@ -211,6 +211,10 @@ def _cancel_pin(debug: "DebugLink") -> None:
|
||||
# It is the same button as DELETE
|
||||
# TODO: implement cancel PIN for TR?
|
||||
_delete_pin(debug, 1, check=False)
|
||||
|
||||
# Note: `prepare()` context manager will send a tap after PIN cancellation,
|
||||
# so we make sure the lockscreen is already up to receive it -- otherwise
|
||||
# the input event may get lost in the loop restart.
|
||||
assert debug.read_layout().main_component() != "PinKeyboard"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user