mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-17 20:08:12 +00:00
fix(tests): fix persistence tests, enable T3B1
This commit is contained in:
parent
8d2f0a6566
commit
e199d2bcaf
4
.github/workflows/core.yml
vendored
4
.github/workflows/core.yml
vendored
@ -21,7 +21,7 @@ env:
|
|||||||
|core UI changes|device test|click test|persistence test|
|
|core UI changes|device test|click test|persistence test|
|
||||||
|---------------|-----------|----------|----------------|
|
|---------------|-----------|----------|----------------|
|
||||||
|T2T1 Model T |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/status.png" width="24" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/master_diff.html))||
|
|T2T1 Model T |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/status.png" width="24" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_device_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_click_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T2T1-en-core_persistence_test/master_diff.html))||
|
||||||
|T3B1 Safe 3 |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/master_diff.html)) |[2724](https://github.com/trezor/trezor-firmware/issues/2724) ||
|
|T3B1 Safe 3 |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_device_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_click_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_persistence_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_persistence_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_persistence_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_persistence_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3B1-en-core_persistence_test/master_diff.html))||
|
||||||
|T3T1 Safe 5 |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/master_diff.html))||
|
|T3T1 Safe 5 |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_device_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_click_test/master_diff.html)) |<img src="https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/status.png" width="20px" height="20px" /> [test](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/differing_screens.html)) [main](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/master_index.html)([screens](https://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/T3T1-en-core_persistence_test/master_diff.html))||
|
||||||
|All |<img src="https://data.trezor.io/dev/firmware/master_diff/${{ github.run_id }}/status.png" width="20px" height="20px" /> [main](https://data.trezor.io/dev/firmware/master_diff/${{ github.run_id }}/index.html)([screens](https://data.trezor.io/dev/firmware/master_diff/${{ github.run_id }}/master_diff.html)) ||
|
|All |<img src="https://data.trezor.io/dev/firmware/master_diff/${{ github.run_id }}/status.png" width="20px" height="20px" /> [main](https://data.trezor.io/dev/firmware/master_diff/${{ github.run_id }}/index.html)([screens](https://data.trezor.io/dev/firmware/master_diff/${{ github.run_id }}/master_diff.html)) ||
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
model: [T2T1, T3T1] # TODO T3B1 https://github.com/trezor/trezor-firmware/issues/2724
|
model: [T2T1, T3B1, T3T1]
|
||||||
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
asan: ${{ fromJSON(needs.param.outputs.asan) }}
|
||||||
env:
|
env:
|
||||||
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
|
||||||
|
@ -56,7 +56,8 @@ def confirm_recovery(debug: "DebugLink", title: str = "recovery__title") -> None
|
|||||||
elif debug.layout_type is LayoutType.Mercury:
|
elif debug.layout_type is LayoutType.Mercury:
|
||||||
debug.swipe_up()
|
debug.swipe_up()
|
||||||
elif debug.layout_type is LayoutType.TR:
|
elif debug.layout_type is LayoutType.TR:
|
||||||
debug.press_right()
|
for _ in range(layout.page_count()):
|
||||||
|
debug.press_right()
|
||||||
|
|
||||||
|
|
||||||
def select_number_of_words(
|
def select_number_of_words(
|
||||||
|
@ -20,7 +20,6 @@ from typing import TYPE_CHECKING, Generator
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from trezorlib import device, messages
|
from trezorlib import device, messages
|
||||||
from trezorlib.debuglink import LayoutType
|
|
||||||
|
|
||||||
from ..common import MNEMONIC12, MNEMONIC_SLIP39_BASIC_20_3of6
|
from ..common import MNEMONIC12, MNEMONIC_SLIP39_BASIC_20_3of6
|
||||||
from . import recovery
|
from . import recovery
|
||||||
@ -55,9 +54,6 @@ def prepare_recovery_and_evaluate(
|
|||||||
def test_recovery_slip39_basic(device_handler: "BackgroundDeviceHandler"):
|
def test_recovery_slip39_basic(device_handler: "BackgroundDeviceHandler"):
|
||||||
with prepare_recovery_and_evaluate(device_handler) as debug:
|
with prepare_recovery_and_evaluate(device_handler) as debug:
|
||||||
recovery.confirm_recovery(debug)
|
recovery.confirm_recovery(debug)
|
||||||
if debug.layout_type is LayoutType.TR:
|
|
||||||
recovery.confirm_recovery(debug)
|
|
||||||
|
|
||||||
recovery.select_number_of_words(debug)
|
recovery.select_number_of_words(debug)
|
||||||
recovery.enter_shares(debug, MNEMONIC_SLIP39_BASIC_20_3of6)
|
recovery.enter_shares(debug, MNEMONIC_SLIP39_BASIC_20_3of6)
|
||||||
recovery.finalize(debug)
|
recovery.finalize(debug)
|
||||||
@ -67,9 +63,6 @@ def test_recovery_slip39_basic(device_handler: "BackgroundDeviceHandler"):
|
|||||||
def test_recovery_bip39(device_handler: "BackgroundDeviceHandler"):
|
def test_recovery_bip39(device_handler: "BackgroundDeviceHandler"):
|
||||||
with prepare_recovery_and_evaluate(device_handler) as debug:
|
with prepare_recovery_and_evaluate(device_handler) as debug:
|
||||||
recovery.confirm_recovery(debug)
|
recovery.confirm_recovery(debug)
|
||||||
if debug.layout_type is LayoutType.TR:
|
|
||||||
recovery.confirm_recovery(debug)
|
|
||||||
|
|
||||||
recovery.select_number_of_words(debug, num_of_words=12)
|
recovery.select_number_of_words(debug, num_of_words=12)
|
||||||
recovery.enter_seed(debug, MNEMONIC12.split())
|
recovery.enter_seed(debug, MNEMONIC12.split())
|
||||||
recovery.finalize(debug)
|
recovery.finalize(debug)
|
||||||
@ -79,9 +72,6 @@ def test_recovery_bip39(device_handler: "BackgroundDeviceHandler"):
|
|||||||
def test_recovery_bip39_previous_word(device_handler: "BackgroundDeviceHandler"):
|
def test_recovery_bip39_previous_word(device_handler: "BackgroundDeviceHandler"):
|
||||||
with prepare_recovery_and_evaluate(device_handler) as debug:
|
with prepare_recovery_and_evaluate(device_handler) as debug:
|
||||||
recovery.confirm_recovery(debug)
|
recovery.confirm_recovery(debug)
|
||||||
if debug.layout_type is LayoutType.TR:
|
|
||||||
recovery.confirm_recovery(debug)
|
|
||||||
|
|
||||||
recovery.select_number_of_words(debug, num_of_words=12)
|
recovery.select_number_of_words(debug, num_of_words=12)
|
||||||
seed_words: list[str] = MNEMONIC12.split()
|
seed_words: list[str] = MNEMONIC12.split()
|
||||||
bad_indexes = {1: seed_words[-1], 7: seed_words[0]}
|
bad_indexes = {1: seed_words[-1], 7: seed_words[0]}
|
||||||
|
@ -85,32 +85,6 @@ class InputFlowBase:
|
|||||||
return self.debug.read_layout().title()
|
return self.debug.read_layout().title()
|
||||||
|
|
||||||
|
|
||||||
class InputFlowSetupDevicePINWIpeCode(InputFlowBase):
|
|
||||||
def __init__(self, client: Client, pin: str, wipe_code: str):
|
|
||||||
super().__init__(client)
|
|
||||||
self.pin = pin
|
|
||||||
self.wipe_code = wipe_code
|
|
||||||
|
|
||||||
def input_flow_common(self) -> BRGeneratorType:
|
|
||||||
yield # do you want to set/change the wipe code?
|
|
||||||
self.debug.press_yes()
|
|
||||||
|
|
||||||
if self.client.layout_type is LayoutType.TR:
|
|
||||||
layout = self.debug.read_layout()
|
|
||||||
if "PinKeyboard" not in layout.all_components():
|
|
||||||
yield from swipe_if_necessary(self.debug) # wipe code info
|
|
||||||
self.debug.press_yes()
|
|
||||||
|
|
||||||
yield # enter current pin
|
|
||||||
self.debug.input(self.pin)
|
|
||||||
yield # enter new wipe code
|
|
||||||
self.debug.input(self.wipe_code)
|
|
||||||
yield # enter new wipe code again
|
|
||||||
self.debug.input(self.wipe_code)
|
|
||||||
yield # success
|
|
||||||
self.debug.press_yes()
|
|
||||||
|
|
||||||
|
|
||||||
class InputFlowNewCodeMismatch(InputFlowBase):
|
class InputFlowNewCodeMismatch(InputFlowBase):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from trezorlib import device, models
|
from trezorlib import device
|
||||||
from trezorlib.debuglink import DebugLink
|
from trezorlib.debuglink import DebugLink, LayoutType
|
||||||
from trezorlib.messages import RecoveryStatus
|
from trezorlib.messages import RecoveryStatus
|
||||||
|
|
||||||
from .. import buttons
|
from ..click_tests import common, recovery
|
||||||
from ..click_tests import recovery
|
|
||||||
from ..common import MNEMONIC_SLIP39_ADVANCED_20, MNEMONIC_SLIP39_BASIC_20_3of6
|
from ..common import MNEMONIC_SLIP39_ADVANCED_20, MNEMONIC_SLIP39_BASIC_20_3of6
|
||||||
from ..device_handler import BackgroundDeviceHandler
|
from ..device_handler import BackgroundDeviceHandler
|
||||||
from ..emulators import Emulator
|
from ..emulators import Emulator
|
||||||
@ -41,16 +40,15 @@ def test_abort(core_emulator: Emulator):
|
|||||||
debug = device_handler.debuglink()
|
debug = device_handler.debuglink()
|
||||||
features = device_handler.features()
|
features = device_handler.features()
|
||||||
|
|
||||||
if debug.model is models.T3T1:
|
if debug.layout_type is LayoutType.Mercury:
|
||||||
pytest.skip("abort not supported on T3T1")
|
pytest.skip("abort not supported on T3T1")
|
||||||
|
|
||||||
assert features.recovery_status == RecoveryStatus.Nothing
|
assert features.recovery_status == RecoveryStatus.Nothing
|
||||||
|
|
||||||
device_handler.run(device.recover, pin_protection=False)
|
device_handler.run(device.recover, pin_protection=False)
|
||||||
|
|
||||||
assert debug.read_layout().title().lower() == "recover wallet"
|
recovery.confirm_recovery(debug)
|
||||||
|
layout = debug.read_layout()
|
||||||
layout = debug.click(buttons.OK)
|
|
||||||
assert "number of words" in layout.text_content()
|
assert "number of words" in layout.text_content()
|
||||||
|
|
||||||
debug = _restart(device_handler, core_emulator)
|
debug = _restart(device_handler, core_emulator)
|
||||||
@ -58,19 +56,19 @@ def test_abort(core_emulator: Emulator):
|
|||||||
|
|
||||||
assert features.recovery_status == RecoveryStatus.Recovery
|
assert features.recovery_status == RecoveryStatus.Recovery
|
||||||
|
|
||||||
# no waiting for layout because layout doesn't change
|
|
||||||
assert "number of words" in debug.read_layout().text_content()
|
assert "number of words" in debug.read_layout().text_content()
|
||||||
# clicking at 24 in word choice (the same coords as CANCEL)
|
# clicking at 24 in word choice
|
||||||
layout = debug.click(buttons.CANCEL)
|
recovery.select_number_of_words(debug, 24)
|
||||||
|
|
||||||
# Cancelling the backup
|
# Cancelling the backup
|
||||||
assert "Enter your backup" in debug.read_layout().text_content()
|
assert "Enter your backup" in debug.read_layout().text_content()
|
||||||
layout = debug.click(buttons.CANCEL)
|
layout = common.go_back(debug)
|
||||||
|
|
||||||
assert layout.title().lower() in ("abort recovery", "cancel recovery")
|
assert layout.title().lower() in ("abort recovery", "cancel recovery")
|
||||||
layout = debug.click(buttons.OK)
|
for _ in range(layout.page_count()):
|
||||||
|
common.go_next(debug)
|
||||||
|
|
||||||
assert layout.main_component() == "Homescreen"
|
assert debug.read_layout().main_component() == "Homescreen"
|
||||||
features = device_handler.features()
|
features = device_handler.features()
|
||||||
assert features.recovery_status == RecoveryStatus.Nothing
|
assert features.recovery_status == RecoveryStatus.Nothing
|
||||||
|
|
||||||
@ -138,7 +136,10 @@ def test_recovery_on_old_wallet(core_emulator: Emulator):
|
|||||||
words = first_share.split(" ")
|
words = first_share.split(" ")
|
||||||
|
|
||||||
# start entering first share
|
# start entering first share
|
||||||
assert "Enter each word of your wallet backup" in debug.read_layout().text_content()
|
assert (
|
||||||
|
"Enter any share" in debug.read_layout().text_content()
|
||||||
|
or "Enter each word" in debug.read_layout().text_content()
|
||||||
|
)
|
||||||
debug.press_yes()
|
debug.press_yes()
|
||||||
assert debug.read_layout().main_component() == "MnemonicKeyboard"
|
assert debug.read_layout().main_component() == "MnemonicKeyboard"
|
||||||
|
|
||||||
@ -176,7 +177,9 @@ def test_recovery_multiple_resets(core_emulator: Emulator):
|
|||||||
def enter_shares_with_restarts(debug: DebugLink) -> None:
|
def enter_shares_with_restarts(debug: DebugLink) -> None:
|
||||||
shares = MNEMONIC_SLIP39_ADVANCED_20
|
shares = MNEMONIC_SLIP39_ADVANCED_20
|
||||||
layout = debug.read_layout()
|
layout = debug.read_layout()
|
||||||
expected_text = "Enter each word of your wallet backup"
|
expected_text = "Enter any share"
|
||||||
|
if debug.layout_type == LayoutType.Mercury:
|
||||||
|
expected_text = "Enter each word"
|
||||||
remaining = len(shares)
|
remaining = len(shares)
|
||||||
for share in shares:
|
for share in shares:
|
||||||
assert expected_text in layout.text_content()
|
assert expected_text in layout.text_content()
|
||||||
|
@ -4,7 +4,6 @@ from trezorlib.debuglink import message_filters
|
|||||||
|
|
||||||
from ..common import MNEMONIC12
|
from ..common import MNEMONIC12
|
||||||
from ..emulators import Emulator, EmulatorWrapper
|
from ..emulators import Emulator, EmulatorWrapper
|
||||||
from ..input_flows import InputFlowSetupDevicePINWIpeCode
|
|
||||||
from ..upgrade_tests import core_only, legacy_only
|
from ..upgrade_tests import core_only, legacy_only
|
||||||
|
|
||||||
PIN = "1234"
|
PIN = "1234"
|
||||||
@ -29,8 +28,7 @@ def setup_device_core(client: Client, pin: str, wipe_code: str) -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
with client:
|
with client:
|
||||||
IF = InputFlowSetupDevicePINWIpeCode(client, pin, wipe_code)
|
client.use_pin_sequence([pin, wipe_code, wipe_code])
|
||||||
client.set_input_flow(IF.get())
|
|
||||||
device.change_wipe_code(client)
|
device.change_wipe_code(client)
|
||||||
|
|
||||||
|
|
||||||
@ -45,6 +43,7 @@ def test_wipe_code_activate_core(core_emulator: Emulator):
|
|||||||
# Initiate Change pin process
|
# Initiate Change pin process
|
||||||
ret = core_emulator.client.call_raw(messages.ChangePin(remove=False))
|
ret = core_emulator.client.call_raw(messages.ChangePin(remove=False))
|
||||||
assert isinstance(ret, messages.ButtonRequest)
|
assert isinstance(ret, messages.ButtonRequest)
|
||||||
|
assert ret.name == "change_pin"
|
||||||
core_emulator.client.debug.press_yes()
|
core_emulator.client.debug.press_yes()
|
||||||
ret = core_emulator.client.call_raw(messages.ButtonAck())
|
ret = core_emulator.client.call_raw(messages.ButtonAck())
|
||||||
|
|
||||||
|
@ -9706,14 +9706,14 @@
|
|||||||
"T2T1_pt_zcash-test_sign_tx.py::test_version_group_id_missing": "c8dd180b3a8e7a34d43048add9ede1704df12cf145d1a8803d896a82b864f344"
|
"T2T1_pt_zcash-test_sign_tx.py::test_version_group_id_missing": "c8dd180b3a8e7a34d43048add9ede1704df12cf145d1a8803d896a82b864f344"
|
||||||
},
|
},
|
||||||
"persistence_tests": {
|
"persistence_tests": {
|
||||||
"T2T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptAlways--081810a6": "384e8cfd6a476b25488bc4a2732ae7c4cf98a15826cee8cc9be5dc320883e423",
|
"T2T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptAlways--081810a6": "d1e7905797c25c34e1be947b2cbcb655b4497068e6e6bdaccf88a1c821339085",
|
||||||
"T2T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptTempora-b3d21f4a": "4f957dc6cc7a5d73e6c3dfd0f498bf1148e086100de9b727b266bb7209c79af8",
|
"T2T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptTempora-b3d21f4a": "d69338d8911fc6f4d4a9b4f23297537a9be60975694572d6c8cd1272c55d2af9",
|
||||||
"T2T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.Strict-Safety-f1ff9c26": "3360ec26667b40053e8ae3a1a706f0988c1c338ea98e22e1ff0c04e4c5e042ae",
|
"T2T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.Strict-Safety-f1ff9c26": "458e2c14abebb664a50fef4082d8933d0db7c167439bcd7ffb11b7fca75dfb66",
|
||||||
"T2T1_en_test_shamir_persistence.py::test_abort": "1d97cfb79dcec3dba5405766401f38c2284050db77b7da067dce80e55d43b01d",
|
"T2T1_en_test_shamir_persistence.py::test_abort": "2ff31047e86de855d4142040cb55fc38afffb4f7ac2a6ce623c77470c5255766",
|
||||||
"T2T1_en_test_shamir_persistence.py::test_recovery_multiple_resets": "394f6811166fd3739900324b34600028c92f5c112f1f7d2eab7bce54434dc0fa",
|
"T2T1_en_test_shamir_persistence.py::test_recovery_multiple_resets": "f353c194c6e7a13b6950b2a6f98056b0f3596170135c34123c696db746b7834d",
|
||||||
"T2T1_en_test_shamir_persistence.py::test_recovery_on_old_wallet": "06ab622055c6fb16c4751a0e17360565459d9530572181c8a807c880137893b1",
|
"T2T1_en_test_shamir_persistence.py::test_recovery_on_old_wallet": "8405ef6de2513430b62149c70baec92a20def9a8b17206f45870ed4ed85b7c6b",
|
||||||
"T2T1_en_test_shamir_persistence.py::test_recovery_single_reset": "01748c2717cd2e1225884248f6fc676e825d942f60721bce1a42bb7e960f62ce",
|
"T2T1_en_test_shamir_persistence.py::test_recovery_single_reset": "f83817579bb27bf151c0907ae2bd952a94d1939dce26215f5d97ddf5b25a5668",
|
||||||
"T2T1_en_test_wipe_code.py::test_wipe_code_activate_core": "36fab76eb0d08d289a3c97cfda4802a6d813f077564671645c665b372531befa"
|
"T2T1_en_test_wipe_code.py::test_wipe_code_activate_core": "80875ba4bae6dcd0a4a3d1438528bfe99c5bc4567ea6c357e59836271f265282"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"T3B1": {
|
"T3B1": {
|
||||||
@ -26708,14 +26708,14 @@
|
|||||||
"T3T1_pt_zcash-test_sign_tx.py::test_version_group_id_missing": "708b1d45065e8456dc4d87f675b4014305d7e197b88b33485c30c10523577104"
|
"T3T1_pt_zcash-test_sign_tx.py::test_version_group_id_missing": "708b1d45065e8456dc4d87f675b4014305d7e197b88b33485c30c10523577104"
|
||||||
},
|
},
|
||||||
"persistence_tests": {
|
"persistence_tests": {
|
||||||
"T3T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptAlways--081810a6": "801da41901bb49a7cc2b0212964c060e3488e14af0ab7fdb27f10631111bcc84",
|
"T3T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptAlways--081810a6": "b05832a6be652be0da7d63e6f29d03ec70c4d13c71d0f0140fb7b76970cbb9c6",
|
||||||
"T3T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptTempora-b3d21f4a": "e997cc958f7d7d262604e7728469f7a6952b60c0b1b3520252e3d58e49b41e66",
|
"T3T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptTempora-b3d21f4a": "f3bb5f6e8812aa5bd227209caca1db8b0cf339b3527cce200160cd141765d639",
|
||||||
"T3T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.Strict-Safety-f1ff9c26": "a0879b23f779049abf46c42608ee7b841a0b8dc4ac83b85ac83a83e992068165",
|
"T3T1_en_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.Strict-Safety-f1ff9c26": "2dd96d140aa4e025fb5accbd3bff3a565792474f9e3241f2a4b12a1fe5b58012",
|
||||||
"T3T1_en_test_shamir_persistence.py::test_abort": "1a5d5ef3d81710c7a0a113514ac287b37d6ab66f284bfe34353dddf634714ea5",
|
"T3T1_en_test_shamir_persistence.py::test_abort": "bd699a53a1a7280a9106222c61dffc4a8967afeef8c5141485bd71eb06daf3de",
|
||||||
"T3T1_en_test_shamir_persistence.py::test_recovery_multiple_resets": "ace0e626ddf56eeac716327fb92ea7a4bdaa155488f47d462ea371724d36acfc",
|
"T3T1_en_test_shamir_persistence.py::test_recovery_multiple_resets": "dfd6c4bc7168d3dfb1c068dcfe8c4768343d4bd1b3522c54eaf487644a6dc835",
|
||||||
"T3T1_en_test_shamir_persistence.py::test_recovery_on_old_wallet": "89a5417c0f4dbdc2932ff705425306707d329bc65f8f9de5652f803c5d18a493",
|
"T3T1_en_test_shamir_persistence.py::test_recovery_on_old_wallet": "4fa6d5b04fe395594fdb1d428120647f127e23b9e6fd72b0bc5c6b12d618e76d",
|
||||||
"T3T1_en_test_shamir_persistence.py::test_recovery_single_reset": "1ee4f62b9967ed9a41575a96b1c115697a741dd3891953e4a96dfff800be203a",
|
"T3T1_en_test_shamir_persistence.py::test_recovery_single_reset": "27ad5d19eadfcbd4eae2283e499258790abcdebcb8a7f36b365241dd9a2b237d",
|
||||||
"T3T1_en_test_wipe_code.py::test_wipe_code_activate_core": "aa4da89845a41383de2a091315a54b90996c1f71692adcfaa69886c35c4ad261"
|
"T3T1_en_test_wipe_code.py::test_wipe_code_activate_core": "581f0fa3207ca2dc938187429b1a993d75b6ffe343a8ac9baddf027542786bac"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user