diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png new file mode 100644 index 00000000..b5c1b1cb Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png new file mode 100644 index 00000000..0417b8fc Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png new file mode 100644 index 00000000..0597aed5 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png new file mode 100644 index 00000000..e2279803 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png new file mode 100644 index 00000000..e2279803 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png new file mode 100644 index 00000000..0cccb5b4 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_1.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_1.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_2.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_2.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png new file mode 100644 index 00000000..b86e6137 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png new file mode 100644 index 00000000..e2279803 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png new file mode 100644 index 00000000..b117e76a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_1.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_1.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_2.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_2.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png new file mode 100644 index 00000000..b86e6137 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png new file mode 100644 index 00000000..e06738f4 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png new file mode 100644 index 00000000..6be9b9c2 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png new file mode 100644 index 00000000..179104fa Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png new file mode 100644 index 00000000..a970fc01 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png new file mode 100644 index 00000000..3a5efb2f Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png new file mode 100644 index 00000000..e06738f4 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png new file mode 100644 index 00000000..6be9b9c2 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png new file mode 100644 index 00000000..179104fa Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png new file mode 100644 index 00000000..a970fc01 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png new file mode 100644 index 00000000..3a5efb2f Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/app_context.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/app_context.png new file mode 100644 index 00000000..65d0193e Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/app_context.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..932d9e23 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_off.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_off.png new file mode 100644 index 00000000..ea8cb6b1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_off.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_on.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_on.png new file mode 100644 index 00000000..9d3701f1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_on.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/app_context.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/app_context.png new file mode 100644 index 00000000..e5941920 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/app_context.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/description.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/description.png new file mode 100644 index 00000000..8c35f5c0 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/description.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..932d9e23 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/hwm_status.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/hwm_status.png new file mode 100644 index 00000000..ea8cb6b1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/hwm_status.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/app_context.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/app_context.png new file mode 100644 index 00000000..4885dfb2 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/app_context.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/description.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/description.png new file mode 100644 index 00000000..8c35f5c0 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/description.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..932d9e23 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/hwm_status.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/hwm_status.png new file mode 100644 index 00000000..ea8cb6b1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/hwm_status.png differ diff --git a/test/test_instructions.py b/test/test_instructions.py index 501f641d..77b73999 100644 --- a/test/test_instructions.py +++ b/test/test_instructions.py @@ -52,6 +52,39 @@ ZEBRA_ACCOUNTS, ) +def disable_hwm(snap_path: Path, backend: BackendInterface, firmware: Firmware, tezos_navigator: TezosNavigator) -> None: + + if firmware.is_nano: + tezos_navigator.assert_screen("home_screen",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("quit",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("Settings",snap_path) + tezos_navigator.press_both_buttons() + tezos_navigator.assert_screen("hwm_enabled",snap_path) + tezos_navigator.press_both_buttons() + tezos_navigator.assert_screen("hwm_disabled",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("back",snap_path) + tezos_navigator.press_both_buttons() + tezos_navigator.assert_screen("home_screen",snap_path) + else: + backend.wait_for_home_screen() + tezos_navigator.home.settings() + backend.wait_for_screen_change() + tezos_navigator.assert_screen("app_context",snap_path) + tezos_navigator.settings.next() + backend.wait_for_screen_change() + tezos_navigator.assert_screen("hwm_status_on",snap_path) + tezos_navigator.layout_choice.choose(1) + backend.wait_for_screen_change() + tezos_navigator.assert_screen("hwm_status_off",snap_path) + tezos_navigator.settings.multi_page_exit() + backend.wait_for_screen_change() + tezos_navigator.assert_screen("home_screen",snap_path) + + + @pytest.mark.parametrize("account", [None, *ACCOUNTS]) def test_review_home(account: Optional[Account], backend: BackendInterface, @@ -74,131 +107,119 @@ def test_review_home(account: Optional[Account], test_hwm ) - def screen(name): - tezos_navigator.assert_screen(name, snap_path=snap_path) - def right(): - backend.right_click() - backend.wait_for_screen_change() - def left(): - backend.left_click() - backend.wait_for_screen_change() - def both(): - backend.both_click() - backend.wait_for_screen_change() - if firmware.is_nano: - screen("home_screen") - right() - screen("version") - right() - screen("chain_id") - right() + tezos_navigator.assert_screen("home_screen",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("version",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("chain_id",snap_path) + tezos_navigator.right() if account is not None and firmware.device == "nanos": for i in range(1, account.nanos_screens + 1): - screen("public_key_hash_" + str(i)) - right() + tezos_navigator.assert_screen("public_key_hash_" + str(i), snap_path) + tezos_navigator.right() else: - screen("public_key_hash") - right() - screen("high_watermark") - right() - screen("settings") - right() - screen("exit") - right() - screen("home_screen") - left() - screen("exit") - left() - screen("settings") - left() - screen("high_watermark") - left() + tezos_navigator.assert_screen("public_key_hash",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("high_watermark",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("settings",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("exit",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("home_screen",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("exit",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("settings",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("high_watermark",snap_path) + tezos_navigator.left() if account is not None and firmware.device == "nanos": for i in reversed(range(1, account.nanos_screens + 1)): - screen("public_key_hash_" + str(i)) - left() + tezos_navigator.assert_screen("public_key_hash_" + str(i),snap_path) + tezos_navigator.left() else: - screen("public_key_hash") - left() - screen("chain_id") - left() - screen("version") - right() - screen("chain_id") - left() - screen("version") - left() - screen("home_screen") - left() - screen("exit") - left() - screen("settings") - left() - screen("high_watermark") - right() + tezos_navigator.assert_screen("public_key_hash",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("chain_id",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("version",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("chain_id",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("version",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("home_screen",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("exit",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("settings",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("high_watermark",snap_path) + tezos_navigator.right() # Check settings menu - screen("settings") - both() - screen("hwm_status_enabled") - both() - screen("hwm_status_disabled") - right() - screen("back") - both() - screen("home_screen") - left() - screen("exit") - right() - screen("home_screen") - left() + tezos_navigator.assert_screen("settings",snap_path) + tezos_navigator.press_both_buttons() + tezos_navigator.assert_screen("hwm_status_enabled",snap_path) + tezos_navigator.press_both_buttons() + tezos_navigator.assert_screen("hwm_status_disabled",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("back",snap_path) + tezos_navigator.press_both_buttons() + tezos_navigator.assert_screen("home_screen",snap_path) + tezos_navigator.left() + tezos_navigator.assert_screen("exit",snap_path) + tezos_navigator.right() + tezos_navigator.assert_screen("home_screen",snap_path) + tezos_navigator.left() else: backend.wait_for_home_screen() tezos_navigator.home.settings() backend.wait_for_screen_change() - screen("app_context") + tezos_navigator.assert_screen("app_context",snap_path) tezos_navigator.settings.next() backend.wait_for_screen_change() - screen("hwm_status") + tezos_navigator.assert_screen("hwm_status",snap_path) tezos_navigator.settings.next() backend.wait_for_screen_change() - screen("description") + tezos_navigator.assert_screen("description",snap_path) tezos_navigator.settings.previous() backend.wait_for_screen_change() - screen("hwm_status") + tezos_navigator.assert_screen("hwm_status",snap_path) tezos_navigator.settings.previous() backend.wait_for_screen_change() - screen("app_context") + tezos_navigator.assert_screen("app_context",snap_path) tezos_navigator.settings.multi_page_exit() backend.wait_for_screen_change() - screen("home_screen") + tezos_navigator.assert_screen("home_screen",snap_path) tezos_navigator.home.settings() backend.wait_for_screen_change() - screen("app_context") + tezos_navigator.assert_screen("app_context",snap_path) tezos_navigator.settings.next() backend.wait_for_screen_change() - screen("hwm_status_on") + tezos_navigator.assert_screen("hwm_status_on",snap_path) tezos_navigator.layout_choice.choose(1) backend.wait_for_screen_change() - screen("hwm_status_off") + tezos_navigator.assert_screen("hwm_status_off",snap_path) tezos_navigator.layout_choice.choose(1) backend.wait_for_screen_change() - screen("hwm_status_on") + tezos_navigator.assert_screen("hwm_status_on",snap_path) tezos_navigator.settings.next() backend.wait_for_screen_change() - screen("description") + tezos_navigator.assert_screen("description",snap_path) tezos_navigator.settings.previous() backend.wait_for_screen_change() - screen("hwm_status_on") + tezos_navigator.assert_screen("hwm_status_on",snap_path) tezos_navigator.settings.previous() backend.wait_for_screen_change() - screen("app_context") + tezos_navigator.assert_screen("app_context",snap_path) tezos_navigator.settings.next() backend.wait_for_screen_change() - screen("hwm_status_on") + tezos_navigator.assert_screen("hwm_status_on",snap_path) tezos_navigator.settings.multi_page_exit() backend.wait_for_screen_change() - screen("home_screen") + tezos_navigator.assert_screen("home_screen",snap_path) def test_version(client: TezosClient) -> None: """Test the VERSION instruction.""" @@ -1226,6 +1247,69 @@ def test_sign_multiple_operation( ) account.check_signature(signature, bytes(message)) +def test_sign_when_hwm_disabled( + client: TezosClient, + backend: BackendInterface, + firmware: Firmware, + tezos_navigator: TezosNavigator) -> None: + """Check that signing, when HWM is disabled, changes the main HWM.""" + + account = DEFAULT_ACCOUNT + snap_path = Path(f"{account}") + + disable_hwm(snap_path, backend, firmware, tezos_navigator) + + tezos_navigator.setup_app_context( + account, + DEFAULT_CHAIN_ID, # Chain = 0 + main_hwm=Hwm(0, 0), + test_hwm=Hwm(0, 0) + ) + + attestation = build_attestation( + 1, 0, + DEFAULT_CHAIN_ID # Chain = 0 + ) + + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(1, 0), + test_hwm=Hwm(0, 0), + snap_path=Path("sign_1_0")) + + attestation = build_attestation( + 2, 0, + "NetXH12AexHqTQa" # Chain = 1 + ) + + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(2, 0), + test_hwm=Hwm(0, 0), + snap_path=Path("sign_2_0")) + + attestation = build_attestation( + 2, 0, + "NetXH12Af5mrXhq" # Chain = 2 + ) + + with StatusCode.WRONG_VALUES.expected(): + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(2, 0), + test_hwm=Hwm(0, 0), + snap_path=Path("sign_2_0") + ) + def test_sign_when_no_chain_setup( client: TezosClient, diff --git a/test/utils/navigator.py b/test/utils/navigator.py index 51e4080c..b17651d5 100644 --- a/test/utils/navigator.py +++ b/test/utils/navigator.py @@ -45,6 +45,7 @@ RESPONSE = TypeVar('RESPONSE') + def send_and_navigate(send: Callable[[], RESPONSE], navigate: Callable[[], None]) -> RESPONSE: """Sends a request and navigates before receiving a response.""" @@ -66,6 +67,7 @@ def send_and_navigate(send: Callable[[], RESPONSE], navigate: Callable[[], None] return result + class TezosUseCaseAddressConfirmation(UseCaseAddressConfirmation): """Extension of UseCaseAddressConfirmation for our app.""" @@ -76,31 +78,34 @@ def show_qr(self): """Tap to show qr code.""" self.client.finger_touch(*TezosUseCaseAddressConfirmation.SHOW_QR) + APP_CONTEXT = Path("app_context") + + class TezosNavigator(metaclass=MetaScreen): """Class representing the tezos app navigator.""" - use_case_home = UseCaseHome - use_case_settings = UseCaseSettings - use_case_review = UseCaseReview + use_case_home = UseCaseHome + use_case_settings = UseCaseSettings + use_case_review = UseCaseReview use_case_provide_pk = UseCaseAddressConfirmation - layout_choice_list = ChoiceList + layout_choice_list = ChoiceList - home: UseCaseHome - settings: UseCaseSettings - review: UseCaseReview - provide_pk: TezosUseCaseAddressConfirmation + home: UseCaseHome + settings: UseCaseSettings + review: UseCaseReview + provide_pk: TezosUseCaseAddressConfirmation layout_choice: ChoiceList - backend: BackendInterface - firmware: Firmware - client: TezosClient + backend: BackendInterface + firmware: Firmware + client: TezosClient navigator: Navigator - _golden_run: bool - _root_dir: Path - _test_name: str - _snapshots_dir: Path + _golden_run: bool + _root_dir: Path + _test_name: str + _snapshots_dir: Path _tmp_snapshots_dir: Path def __init__(self, @@ -110,16 +115,16 @@ def __init__(self, navigator: Navigator, golden_run: bool, test_name: str) -> None: - self.backend = backend - self.firmware = firmware - self.client = client + self.backend = backend + self.firmware = firmware + self.client = client self.navigator = navigator self.layout_choice = ChoiceList(backend, firmware) - self._golden_run = golden_run - self._root_dir = TESTS_ROOT_DIR - self._test_name = test_name - self._snapshots_dir = \ + self._golden_run = golden_run + self._root_dir = TESTS_ROOT_DIR + self._test_name = test_name + self._snapshots_dir = \ self._root_dir / "snapshots" / self.firmware.name / self._test_name self._tmp_snapshots_dir = \ self._root_dir / "snapshots-tmp" / self.firmware.name / self._test_name @@ -199,7 +204,7 @@ def check_app_context(self, assert received_path == account.path, \ f"Expected path {account.path} but got {received_path}" assert received_sig_scheme == account.sig_scheme, \ - f"Expected signature scheme {account.sig_scheme.name} "\ + f"Expected signature scheme {account.sig_scheme.name} " \ f"but got {received_sig_scheme.name}" snap_path = snap_path / APP_CONTEXT @@ -323,21 +328,21 @@ def accept_key_navigate(self, **kwargs): """Navigate until accept key""" if self.firmware.is_nano: self.navigate_and_compare( - navigate_instruction = NavInsID.RIGHT_CLICK, - validation_instructions = [NavInsID.BOTH_CLICK], - text = 'Accept', + navigate_instruction=NavInsID.RIGHT_CLICK, + validation_instructions=[NavInsID.BOTH_CLICK], + text='Accept', **kwargs ) else: self.navigate_and_compare( - navigate_instruction = NavInsID.USE_CASE_ADDRESS_CONFIRMATION_TAP, - validation_instructions = [ + navigate_instruction=NavInsID.USE_CASE_ADDRESS_CONFIRMATION_TAP, + validation_instructions=[ NavIns(NavInsID.TOUCH, TezosUseCaseAddressConfirmation.SHOW_QR), NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR, NavInsID.USE_CASE_CHOICE_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS ], - text = 'Confirm', + text='Confirm', **kwargs ) @@ -369,19 +374,19 @@ def accept_reset_navigate(self, **kwargs): """Navigate until accept reset""" if self.firmware.is_nano: self.navigate_and_compare( - navigate_instruction = NavInsID.RIGHT_CLICK, - validation_instructions = [NavInsID.BOTH_CLICK], - text = 'Accept', + navigate_instruction=NavInsID.RIGHT_CLICK, + validation_instructions=[NavInsID.BOTH_CLICK], + text='Accept', **kwargs ) else: self.navigate_and_compare( - navigate_instruction = NavInsID.USE_CASE_REVIEW_TAP, - validation_instructions = [ + navigate_instruction=NavInsID.USE_CASE_REVIEW_TAP, + validation_instructions=[ NavInsID.USE_CASE_CHOICE_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS ], - text = 'Approve', + text='Approve', **kwargs ) @@ -401,19 +406,19 @@ def accept_setup_navigate(self, **kwargs): """Navigate until accept setup""" if self.firmware.is_nano: self.navigate_and_compare( - navigate_instruction = NavInsID.RIGHT_CLICK, - validation_instructions = [NavInsID.BOTH_CLICK], - text = 'Accept', + navigate_instruction=NavInsID.RIGHT_CLICK, + validation_instructions=[NavInsID.BOTH_CLICK], + text='Accept', **kwargs ) else: self.navigate_and_compare( - navigate_instruction = NavInsID.USE_CASE_REVIEW_TAP, - validation_instructions = [ + navigate_instruction=NavInsID.USE_CASE_REVIEW_TAP, + validation_instructions=[ NavInsID.USE_CASE_CHOICE_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS ], - text = 'Approve', + text='Approve', **kwargs ) @@ -441,19 +446,19 @@ def accept_sign_navigate(self, **kwargs): """Navigate until accept signing""" if self.firmware.is_nano: self.navigate_and_compare( - navigate_instruction = NavInsID.RIGHT_CLICK, - validation_instructions = [NavInsID.BOTH_CLICK], - text = 'Accept', + navigate_instruction=NavInsID.RIGHT_CLICK, + validation_instructions=[NavInsID.BOTH_CLICK], + text='Accept', **kwargs ) else: self.navigate_and_compare( - navigate_instruction = NavInsID.USE_CASE_REVIEW_TAP, - validation_instructions = [ + navigate_instruction=NavInsID.USE_CASE_REVIEW_TAP, + validation_instructions=[ NavInsID.USE_CASE_CHOICE_CONFIRM, NavInsID.USE_CASE_STATUS_DISMISS ], - text = 'Approve', + text='Approve', **kwargs ) @@ -490,3 +495,18 @@ def sign_delegation_with_hash(self, ), navigate=lambda: navigate(**kwargs) ) + + def right(self): + """Move to right screen""" + self.backend.right_click() + self.backend.wait_for_screen_change() + + def left(self): + """Move to left screen""" + self.backend.left_click() + self.backend.wait_for_screen_change() + + def press_both_buttons(self): + """Press both buttons in Nano device""" + self.backend.both_click() + self.backend.wait_for_screen_change()