1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

fix(tests): using press_info instead of click for info buttons

This commit is contained in:
grdddj 2022-01-27 11:48:14 +01:00 committed by matejcik
parent 8524f4b6ba
commit 3536d86fa9
5 changed files with 7 additions and 22 deletions

View File

@ -18,7 +18,6 @@ BOTTOM = grid(DISPLAY_HEIGHT, 4, 3)
OK = (RIGHT, BOTTOM)
CANCEL = (LEFT, BOTTOM)
INFO = (MID, BOTTOM)
INFO_SHAMIR_RECOVERY = (LEFT, BOTTOM)
CONFIRM_WORD = (MID, TOP)

View File

@ -22,8 +22,6 @@ import pytest
from trezorlib import btc, tools
from trezorlib.messages import ButtonRequestType as B
from .buttons import INFO
# fmt: off
# 1 2 3 4 5 6 7 8 9 10 11 12
MNEMONIC12 = "alcohol woman abuse must during monitor noble actual mixed trade anger aisle"
@ -157,10 +155,8 @@ def recovery_enter_shares(debug, shares, groups=False, click_info=False):
if click_info:
# Moving through the INFO button
debug.wait_layout()
debug.click(INFO)
debug.press_info()
yield
debug.wait_layout()
debug.swipe_up()
debug.press_yes()

View File

@ -53,8 +53,6 @@ def _test_secret(client, shares, secret, click_info=False):
)
with client:
if click_info:
client.watch_layout()
client.set_input_flow(input_flow)
ret = device.recover(
client, pin_protection=False, passphrase_protection=False, label="label"

View File

@ -22,7 +22,6 @@ from trezorlib import device, messages
from trezorlib.exceptions import TrezorFailure
from trezorlib.messages import ButtonRequestType as B
from ..buttons import INFO_SHAMIR_RECOVERY
from ..common import (
MNEMONIC12,
MNEMONIC_SLIP39_ADVANCED_20,
@ -33,12 +32,9 @@ from ..common import (
def click_info_button(debug):
"""Click Shamir backup info button and return back."""
debug.wait_layout()
debug.click(INFO_SHAMIR_RECOVERY)
debug.press_info()
yield # Info screen with text
# Confirming the info message, press_yes() did not work
debug.wait_layout()
debug.click(INFO_SHAMIR_RECOVERY)
debug.press_yes()
@pytest.mark.skip_t1 # TODO we want this for t1 too
@ -120,8 +116,6 @@ def test_backup_slip39_basic(client, click_info: bool):
client.debug.press_yes()
with client:
if click_info:
client.watch_layout()
client.set_input_flow(input_flow)
client.set_expected_responses(
[messages.ButtonRequest(code=B.ResetDevice)]
@ -200,8 +194,6 @@ def test_backup_slip39_advanced(client, click_info: bool):
client.debug.press_yes()
with client:
if click_info:
client.watch_layout()
client.set_input_flow(input_flow)
client.set_expected_responses(
[messages.ButtonRequest(code=B.ResetDevice)]

View File

@ -726,8 +726,8 @@
"reset_recovery-test_recovery_slip39_advanced.py::test_same_share": "9beff3d0bd3846fdb8a6539277a2ed07b3ada9e89211d78d5e976a36d70edd09",
"reset_recovery-test_recovery_slip39_advanced.py::test_secret[shares0-c2d2e26ad06023c60145f1-afc2dad5": "f8ce0cbe8cc57f105c1871ad57e62deba75051a8952989010c32bc69cc2f58a0",
"reset_recovery-test_recovery_slip39_advanced.py::test_secret[shares1-c41d5cf80fed71a008a3a0-eb47093e": "8e7410fd4e2cf20530ea079588ef61829a7948a1aa12e3776cbbd19153516151",
"reset_recovery-test_recovery_slip39_advanced.py::test_secret_click_info_button[shares0-c2d2-850ffa77": "61f31fe7298aee6be9dbdfe6d3316d96b980b1796f505dd1f85216676c1c3733",
"reset_recovery-test_recovery_slip39_advanced.py::test_secret_click_info_button[shares1-c41d-ca9ddec8": "7b6537c008092c5875d551fb83d52af3227e1149ecb15c4e8a9095e3e95ca26f",
"reset_recovery-test_recovery_slip39_advanced.py::test_secret_click_info_button[shares0-c2d2-850ffa77": "954b502c761b3197ffd10ccd905828c2453ffd4e5b5f10f547cd313d342c53da",
"reset_recovery-test_recovery_slip39_advanced.py::test_secret_click_info_button[shares1-c41d-ca9ddec8": "04c2cb75d493daa21a2c541e150bfd6b1bcf034b3a523bef82d5c890f0b2c064",
"reset_recovery-test_recovery_slip39_advanced_dryrun.py::test_2of3_dryrun": "09e5dc650f1d95ee75cb1d6c50460da9865900b2991c4b04e027c4c40d0e39d0",
"reset_recovery-test_recovery_slip39_advanced_dryrun.py::test_2of3_invalid_seed_dryrun": "282b18ab25bc393493355b6a51959a5cfc221cda87ec64985a634630177a02a1",
"reset_recovery-test_recovery_slip39_basic.py::test_1of1": "65c8af9357e1e499cd17246100415bbcae7646a11d2b6381b88961b1b19e87a9",
@ -840,9 +840,9 @@
"test_msg_applysettings.py::test_label_too_long": "c09de07fbbf1e047442180e2facb5482d06a1a428891b875b7dd93c9e4704ae1",
"test_msg_applysettings.py::test_safety_checks": "71ac970ca0d87f1ef70a8605dcc4db478a9190333307ff37ee90dd3d3e97e0fa",
"test_msg_backup_device.py::test_backup_bip39": "9b572b12da20b516222ecb0a76fba6d6de5193647405b67625140ed3ed45049c",
"test_msg_backup_device.py::test_backup_slip39_advanced[click_info]": "109ca7d22aec0f47fdee5ce22db4ef3670ee783bab31abc5666f076c96126e26",
"test_msg_backup_device.py::test_backup_slip39_advanced[click_info]": "857cbfaea4dd471d9d2e41d583c72b19942ebc1648f9a47c8ead57b233cc6bf7",
"test_msg_backup_device.py::test_backup_slip39_advanced[no_click_info]": "ff2ffe2c93d8784566e2ac9516f8fd41f4f7e45e1272aff6d3313bdca173e6e2",
"test_msg_backup_device.py::test_backup_slip39_basic[click_info]": "41f8beb6c0837ceae3d693e9fe900aec6b6d7917ef13d59763bbd6d7f147ff52",
"test_msg_backup_device.py::test_backup_slip39_basic[click_info]": "8bc1b2586ee94a3db4ab88f6a5782b2a07fb427715eb2b6401e48961383e8dff",
"test_msg_backup_device.py::test_backup_slip39_basic[no_click_info]": "fe7ef8726326e2702ee680418d8a32cf2e0d062accbc70acbe88abd86cbf9f6d",
"test_msg_backup_device.py::test_interrupt_backup_fails": "75ab647310ba48b46e161de8204590807f04490e60a4f664749433016b9f5ff4",
"test_msg_backup_device.py::test_no_backup_fails": "a489388c56078b4aa243d991b898b196a5c4b05573c526db06eeb11d41e98ec8",