diff --git a/app/src/ui_stream_nbgl.c b/app/src/ui_stream_nbgl.c index 6788a6098..faee5e741 100644 --- a/app/src/ui_stream_nbgl.c +++ b/app/src/ui_stream_nbgl.c @@ -94,7 +94,7 @@ blindsign_splash(void) { TZ_PREAMBLE(("void")); nbgl_useCaseReviewStart( - &C_round_warning_64px, "Blind signing", + &C_Important_Circle_64px, "Blind signing", "This transaction can not be securely interpreted by Ledger Stax. It " "might put your assets at risk.", "Reject transaction", start_blindsign, tz_reject_ui); @@ -127,11 +127,12 @@ switch_to_blindsigning(__attribute__((unused)) const char *err_type, global.keys.apdu.sign.step = SIGN_ST_WAIT_USER_INPUT; global.step = ST_BLIND_SIGN; if (N_settings.blindsigning) { - nbgl_useCaseReviewStart( - &C_round_warning_64px, "Blind signing required:\nParsing Error", - err_code, "Reject transaction", blindsign_splash, tz_reject_ui); + nbgl_useCaseReviewStart(&C_Important_Circle_64px, + "Blind signing required:\nParsing Error", + err_code, "Reject transaction", + blindsign_splash, tz_reject_ui); } else { - nbgl_useCaseChoice(&C_round_warning_64px, + nbgl_useCaseChoice(&C_Important_Circle_64px, "Enable blind signing to authorize this " "transaction:\nParsing Error", err_code, "Enable blind signing", @@ -145,7 +146,7 @@ expert_mode_splash(void) { TZ_PREAMBLE(("void")); - nbgl_useCaseReviewStart(&C_round_warning_64px, "Expert mode", + nbgl_useCaseReviewStart(&C_Important_Circle_64px, "Expert mode", "Next screen requires careful review", "Reject transaction", tz_ui_stream_start, tz_reject_ui); @@ -175,7 +176,7 @@ tz_enable_expert_mode_ui(void) { FUNC_LEAVE(); - nbgl_useCaseChoice(&C_round_warning_64px, + nbgl_useCaseChoice(&C_Important_Circle_64px, "Enable expert mode to authorize this " "transaction", "", "Enable expert mode", "Reject transaction", diff --git a/tests/integration/stax/snapshots/home.png b/tests/integration/stax/snapshots/home.png index 4f9e3805f..e31899e3a 100644 Binary files a/tests/integration/stax/snapshots/home.png and b/tests/integration/stax/snapshots/home.png differ diff --git a/tests/integration/stax/snapshots/info.png b/tests/integration/stax/snapshots/info.png index 0c32ca192..a0eae82e6 100644 Binary files a/tests/integration/stax/snapshots/info.png and b/tests/integration/stax/snapshots/info.png differ diff --git a/tests/integration/stax/snapshots/test_basic/settings.png b/tests/integration/stax/snapshots/test_basic/settings.png new file mode 100644 index 000000000..6c50c8782 Binary files /dev/null and b/tests/integration/stax/snapshots/test_basic/settings.png differ diff --git a/tests/integration/stax/snapshots/test_basic/settings_blindsigning_expert_on.png b/tests/integration/stax/snapshots/test_basic/settings_blindsigning_expert_on.png index f353917c8..8b689d606 100644 Binary files a/tests/integration/stax/snapshots/test_basic/settings_blindsigning_expert_on.png and b/tests/integration/stax/snapshots/test_basic/settings_blindsigning_expert_on.png differ diff --git a/tests/integration/stax/snapshots/test_basic/settings_blindsigning_off.png b/tests/integration/stax/snapshots/test_basic/settings_blindsigning_off.png deleted file mode 100644 index 34bedd2af..000000000 Binary files a/tests/integration/stax/snapshots/test_basic/settings_blindsigning_off.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_basic/settings_blindsigning_on.png b/tests/integration/stax/snapshots/test_basic/settings_blindsigning_on.png index 4c04a3a8f..c392b5779 100644 Binary files a/tests/integration/stax/snapshots/test_basic/settings_blindsigning_on.png and b/tests/integration/stax/snapshots/test_basic/settings_blindsigning_on.png differ diff --git a/tests/integration/stax/snapshots/test_basic/settings_expert_on.png b/tests/integration/stax/snapshots/test_basic/settings_expert_on.png index eb4091467..dbf98ba4f 100644 Binary files a/tests/integration/stax/snapshots/test_basic/settings_expert_on.png and b/tests/integration/stax/snapshots/test_basic/settings_expert_on.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_enabled.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_enabled.png index 9d9cdb425..f0e6bece5 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_enabled.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_enabled.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_warning.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_warning.png index 18a89739c..c69e9df4a 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_warning.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/blindsign_warning.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/loading_operation.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/loading_operation.png index 9be605066..07f9d75ed 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/loading_operation.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/loading_operation.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/operation_sign.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/operation_sign.png index 00a1aff3c..d543e3a72 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/operation_sign.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/operation_sign.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/settings_blindsigning_on.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/settings_blindsigning_on.png index 4c04a3a8f..c392b5779 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/settings_blindsigning_on.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/settings_blindsigning_on.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/signing_successful.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/signing_successful.png index a21279c8a..a24543af4 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/signing_successful.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/signing_successful.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_0.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_0.png index 0f628bbe4..41efa88a1 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_0.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_0.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_1.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_1.png index 50db47c40..d5f19117b 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_1.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/tbtd_review_1.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_blindsign_notify.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_blindsign_notify.png index 40df3734c..20b65266d 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_blindsign_notify.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_blindsign_notify.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_enable_blindsign.png b/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_enable_blindsign.png index 28cb92fc5..785902748 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_enable_blindsign.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep/too_deep_enable_blindsign.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_enabled.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_enabled.png index 9d9cdb425..f0e6bece5 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_enabled.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_enabled.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_warning.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_warning.png index 18a89739c..c69e9df4a 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_warning.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/blindsign_warning.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/loading_operation.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/loading_operation.png index 9be605066..07f9d75ed 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/loading_operation.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/loading_operation.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/operation_sign.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/operation_sign.png index 00a1aff3c..d543e3a72 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/operation_sign.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/operation_sign.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/reject_review.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/reject_review.png index babad9890..823680d9b 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/reject_review.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/reject_review.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/rejected.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/rejected.png index cebc8bede..2b6697001 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/rejected.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/rejected.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/tbtd_review_1.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/tbtd_review_1.png index 50db47c40..d5f19117b 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/tbtd_review_1.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/tbtd_review_1.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_blindsign_notify.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_blindsign_notify.png index 40df3734c..20b65266d 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_blindsign_notify.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_blindsign_notify.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_enable_blindsign.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_enable_blindsign.png index 28cb92fc5..785902748 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_enable_blindsign.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_enable_blindsign.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_expression.png b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_expression.png index 0f628bbe4..41efa88a1 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_expression.png and b/tests/integration/stax/snapshots/test_blindsign_too_deep_rejections/too_deep_expression.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_enabled.png b/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_enabled.png index 9d9cdb425..f0e6bece5 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_enabled.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_enabled.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_warning.png b/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_warning.png index 18a89739c..c69e9df4a 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_warning.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/blindsign_warning.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/operation_sign.png b/tests/integration/stax/snapshots/test_blindsign_too_large/operation_sign.png index 00a1aff3c..d543e3a72 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/operation_sign.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/operation_sign.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_blindsign_too_large/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/settings_blindsigning_on.png b/tests/integration/stax/snapshots/test_blindsign_too_large/settings_blindsigning_on.png index 4c04a3a8f..c392b5779 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/settings_blindsigning_on.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/settings_blindsigning_on.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/signing_successful.png b/tests/integration/stax/snapshots/test_blindsign_too_large/signing_successful.png index a21279c8a..a24543af4 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/signing_successful.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/signing_successful.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/tbtl_review_1.png b/tests/integration/stax/snapshots/test_blindsign_too_large/tbtl_review_1.png index 7fc8c6a9e..3f66ad56b 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/tbtl_review_1.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/tbtl_review_1.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_blindsign_notify.png b/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_blindsign_notify.png index 07fe4c3ee..d7fc227ee 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_blindsign_notify.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_blindsign_notify.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_enable_blindsign.png b/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_enable_blindsign.png index ca86bf479..15c1fb629 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_enable_blindsign.png and b/tests/integration/stax/snapshots/test_blindsign_too_large/too_large_enable_blindsign.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/enable_expert_mode.png b/tests/integration/stax/snapshots/test_blindsign_valid/enable_expert_mode.png index ce99c8d59..2721dadfa 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/enable_expert_mode.png and b/tests/integration/stax/snapshots/test_blindsign_valid/enable_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/enabled_expert_mode.png b/tests/integration/stax/snapshots/test_blindsign_valid/enabled_expert_mode.png index 959148f04..b3b023d25 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/enabled_expert_mode.png and b/tests/integration/stax/snapshots/test_blindsign_valid/enabled_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/expert_mode_splash.png b/tests/integration/stax/snapshots/test_blindsign_valid/expert_mode_splash.png index 824d4453b..5bc079b4f 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/expert_mode_splash.png and b/tests/integration/stax/snapshots/test_blindsign_valid/expert_mode_splash.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/operation_sign.png b/tests/integration/stax/snapshots/test_blindsign_valid/operation_sign.png index f5efd4db0..86df262c7 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/operation_sign.png and b/tests/integration/stax/snapshots/test_blindsign_valid/operation_sign.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_blindsign_valid/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_blindsign_valid/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/settings.png b/tests/integration/stax/snapshots/test_blindsign_valid/settings.png new file mode 100644 index 000000000..6c50c8782 Binary files /dev/null and b/tests/integration/stax/snapshots/test_blindsign_valid/settings.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/settings_blindsigning_off.png b/tests/integration/stax/snapshots/test_blindsign_valid/settings_blindsigning_off.png deleted file mode 100644 index 34bedd2af..000000000 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/settings_blindsigning_off.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/settings_blindsigning_on.png b/tests/integration/stax/snapshots/test_blindsign_valid/settings_blindsigning_on.png index 4c04a3a8f..c392b5779 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/settings_blindsigning_on.png and b/tests/integration/stax/snapshots/test_blindsign_valid/settings_blindsigning_on.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/signing_successful.png b/tests/integration/stax/snapshots/test_blindsign_valid/signing_successful.png index a21279c8a..a24543af4 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/signing_successful.png and b/tests/integration/stax/snapshots/test_blindsign_valid/signing_successful.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_001.png b/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_001.png index 1b8de0032..2307a8814 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_001.png and b/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_001.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_002.png b/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_002.png index 93c6756f5..ac9f785e6 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_002.png and b/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_002.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_003.png b/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_003.png index 93af184c9..d48444ff1 100644 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_003.png and b/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_003.png differ diff --git a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_004.png b/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_004.png deleted file mode 100644 index afb0c5601..000000000 Binary files a/tests/integration/stax/snapshots/test_blindsign_valid/tst_review_004.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/enable_expert_mode.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/enable_expert_mode.png index ce99c8d59..2721dadfa 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/enable_expert_mode.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/enable_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/enabled_expert_mode.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/enabled_expert_mode.png index 959148f04..b3b023d25 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/enabled_expert_mode.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/enabled_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/expert_mode_splash.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/expert_mode_splash.png index 824d4453b..5bc079b4f 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/expert_mode_splash.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/expert_mode_splash.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/reject_review.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/reject_review.png index babad9890..823680d9b 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/reject_review.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/reject_review.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/rejected.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/rejected.png index cebc8bede..2b6697001 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/rejected.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/rejected.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_001.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_001.png index 1b8de0032..2307a8814 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_001.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_001.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_002.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_002.png index 93c6756f5..ac9f785e6 100644 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_002.png and b/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_002.png differ diff --git a/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_003.png b/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_003.png deleted file mode 100644 index 93af184c9..000000000 Binary files a/tests/integration/stax/snapshots/test_expert_mode_rejections/tst_review_003.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/enable_expert_mode.png b/tests/integration/stax/snapshots/test_parsing_errors/enable_expert_mode.png index ce99c8d59..2721dadfa 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/enable_expert_mode.png and b/tests/integration/stax/snapshots/test_parsing_errors/enable_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/enabled_expert_mode.png b/tests/integration/stax/snapshots/test_parsing_errors/enabled_expert_mode.png index 959148f04..b3b023d25 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/enabled_expert_mode.png and b/tests/integration/stax/snapshots/test_parsing_errors/enabled_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/expert_mode_splash.png b/tests/integration/stax/snapshots/test_parsing_errors/expert_mode_splash.png index 824d4453b..5bc079b4f 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/expert_mode_splash.png and b/tests/integration/stax/snapshots/test_parsing_errors/expert_mode_splash.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/invalid_tag.png b/tests/integration/stax/snapshots/test_parsing_errors/invalid_tag.png index c3a2499ef..1775feea9 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/invalid_tag.png and b/tests/integration/stax/snapshots/test_parsing_errors/invalid_tag.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/reject_review.png b/tests/integration/stax/snapshots/test_parsing_errors/reject_review.png index babad9890..823680d9b 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/reject_review.png and b/tests/integration/stax/snapshots/test_parsing_errors/reject_review.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/rejected.png b/tests/integration/stax/snapshots/test_parsing_errors/rejected.png index cebc8bede..2b6697001 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/rejected.png and b/tests/integration/stax/snapshots/test_parsing_errors/rejected.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_parsing_errors/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_parsing_errors/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/too_deep.png b/tests/integration/stax/snapshots/test_parsing_errors/too_deep.png index 28cb92fc5..785902748 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/too_deep.png and b/tests/integration/stax/snapshots/test_parsing_errors/too_deep.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/too_large.png b/tests/integration/stax/snapshots/test_parsing_errors/too_large.png index ca86bf479..15c1fb629 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/too_large.png and b/tests/integration/stax/snapshots/test_parsing_errors/too_large.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_01.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_01.png index 1b8de0032..2307a8814 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_01.png and b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_01.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02.png new file mode 100644 index 000000000..53edbdc44 Binary files /dev/null and b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_dest_only.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_dest_only.png index 93c6756f5..5a317c134 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_dest_only.png and b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_dest_only.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_full.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_full.png index 93c6756f5..ac9f785e6 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_full.png and b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_full.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_partial.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_partial.png deleted file mode 100644 index 93c6756f5..000000000 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_02_partial.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_03.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_03.png deleted file mode 100644 index 8f3f0ae14..000000000 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_03.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_03_full.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_03_full.png index 93af184c9..d48444ff1 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_03_full.png and b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_03_full.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_04_full.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_04_full.png deleted file mode 100644 index afb0c5601..000000000 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_0_04_full.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_1_01.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_1_01.png index 60dc8ade5..6c3863b91 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_1_01.png and b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_1_01.png differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_1_02.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_1_02.png deleted file mode 100644 index ecd68e2d2..000000000 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_1_02.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_too_deep_0.png b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_too_deep_0.png index 0f628bbe4..41efa88a1 100644 Binary files a/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_too_deep_0.png and b/tests/integration/stax/snapshots/test_parsing_errors/tpe_review_too_deep_0.png differ diff --git a/tests/integration/stax/snapshots/test_provide_pk/address_verified.png b/tests/integration/stax/snapshots/test_provide_pk/address_verified.png index 3f906b2b7..7a4947867 100644 Binary files a/tests/integration/stax/snapshots/test_provide_pk/address_verified.png and b/tests/integration/stax/snapshots/test_provide_pk/address_verified.png differ diff --git a/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra.png b/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra.png index 55e363b99..abaf55b6c 100644 Binary files a/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra.png and b/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra.png differ diff --git a/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra_qrcode.png b/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra_qrcode.png index 8e82d110f..f52b0fb7b 100644 Binary files a/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra_qrcode.png and b/tests/integration/stax/snapshots/test_provide_pk/screen_show_address_tz1_zebra_qrcode.png differ diff --git a/tests/integration/stax/snapshots/test_provide_pk/screen_verify_address.png b/tests/integration/stax/snapshots/test_provide_pk/screen_verify_address.png index 30e9c2f4d..b83374200 100644 Binary files a/tests/integration/stax/snapshots/test_provide_pk/screen_verify_address.png and b/tests/integration/stax/snapshots/test_provide_pk/screen_verify_address.png differ diff --git a/tests/integration/stax/snapshots/test_provide_pk_reject/address_rejected.png b/tests/integration/stax/snapshots/test_provide_pk_reject/address_rejected.png index b0eba3f0c..94c91bb65 100644 Binary files a/tests/integration/stax/snapshots/test_provide_pk_reject/address_rejected.png and b/tests/integration/stax/snapshots/test_provide_pk_reject/address_rejected.png differ diff --git a/tests/integration/stax/snapshots/test_provide_pk_reject/screen_show_address_tz1_zebra.png b/tests/integration/stax/snapshots/test_provide_pk_reject/screen_show_address_tz1_zebra.png index 55e363b99..abaf55b6c 100644 Binary files a/tests/integration/stax/snapshots/test_provide_pk_reject/screen_show_address_tz1_zebra.png and b/tests/integration/stax/snapshots/test_provide_pk_reject/screen_show_address_tz1_zebra.png differ diff --git a/tests/integration/stax/snapshots/test_provide_pk_reject/screen_verify_address.png b/tests/integration/stax/snapshots/test_provide_pk_reject/screen_verify_address.png index 30e9c2f4d..b83374200 100644 Binary files a/tests/integration/stax/snapshots/test_provide_pk_reject/screen_verify_address.png and b/tests/integration/stax/snapshots/test_provide_pk_reject/screen_verify_address.png differ diff --git a/tests/integration/stax/snapshots/test_reject_review_operation/confirm_rejection.png b/tests/integration/stax/snapshots/test_reject_review_operation/confirm_rejection.png index babad9890..823680d9b 100644 Binary files a/tests/integration/stax/snapshots/test_reject_review_operation/confirm_rejection.png and b/tests/integration/stax/snapshots/test_reject_review_operation/confirm_rejection.png differ diff --git a/tests/integration/stax/snapshots/test_reject_review_operation/reject_review.png b/tests/integration/stax/snapshots/test_reject_review_operation/reject_review.png index cebc8bede..2b6697001 100644 Binary files a/tests/integration/stax/snapshots/test_reject_review_operation/reject_review.png and b/tests/integration/stax/snapshots/test_reject_review_operation/reject_review.png differ diff --git a/tests/integration/stax/snapshots/test_reject_review_operation/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_reject_review_operation/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_reject_review_operation/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_reject_review_operation/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_reject_transfer/confirm_rejection.png b/tests/integration/stax/snapshots/test_reject_transfer/confirm_rejection.png index babad9890..823680d9b 100644 Binary files a/tests/integration/stax/snapshots/test_reject_transfer/confirm_rejection.png and b/tests/integration/stax/snapshots/test_reject_transfer/confirm_rejection.png differ diff --git a/tests/integration/stax/snapshots/test_reject_transfer/reject_review.png b/tests/integration/stax/snapshots/test_reject_transfer/reject_review.png index cebc8bede..2b6697001 100644 Binary files a/tests/integration/stax/snapshots/test_reject_transfer/reject_review.png and b/tests/integration/stax/snapshots/test_reject_transfer/reject_review.png differ diff --git a/tests/integration/stax/snapshots/test_reject_transfer/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_reject_transfer/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_reject_transfer/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_reject_transfer/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_reject_transfer/trt_review_1.png b/tests/integration/stax/snapshots/test_reject_transfer/trt_review_1.png index 1b8de0032..2307a8814 100644 Binary files a/tests/integration/stax/snapshots/test_reject_transfer/trt_review_1.png and b/tests/integration/stax/snapshots/test_reject_transfer/trt_review_1.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enable_expert_mode.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enable_expert_mode.png index ce99c8d59..2721dadfa 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enable_expert_mode.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enable_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enabled_expert_mode.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enabled_expert_mode.png index 959148f04..b3b023d25 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enabled_expert_mode.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/enabled_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/expert_mode_splash.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/expert_mode_splash.png index 824d4453b..5bc079b4f 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/expert_mode_splash.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/expert_mode_splash.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_0.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_0.png index 17dce455c..61753131d 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_0.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_0.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_1.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_1.png index e14d47628..afdf8da80 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_1.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_1.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_2.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_2.png index 066c28768..c16356118 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_2.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_2.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_3.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_3.png deleted file mode 100644 index bc8eb8bce..000000000 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_proof_396...834_3.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_sign.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_sign.png index f5efd4db0..4cddc94eb 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_sign.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/operation_sign.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/signing_successful.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/signing_successful.png index a21279c8a..a24543af4 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/signing_successful.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/signing_successful.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_00.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_00.png index 60dc8ade5..6c3863b91 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_00.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_00.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_01.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_01.png index ecd68e2d2..b529a3dd1 100644 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_01.png and b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_01.png differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_02.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_02.png deleted file mode 100644 index 1d4563259..000000000 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages/tseom_review_02.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages_skip/outbox_review_0.png b/tests/integration/stax/snapshots/test_sign_execute_outbox_messages_skip/outbox_review_0.png deleted file mode 100644 index 667f7927c..000000000 Binary files a/tests/integration/stax/snapshots/test_sign_execute_outbox_messages_skip/outbox_review_0.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/enable_expert_mode.png b/tests/integration/stax/snapshots/test_sign_transfer/enable_expert_mode.png index ce99c8d59..2721dadfa 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/enable_expert_mode.png and b/tests/integration/stax/snapshots/test_sign_transfer/enable_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/enabled_expert_mode.png b/tests/integration/stax/snapshots/test_sign_transfer/enabled_expert_mode.png index 959148f04..b3b023d25 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/enabled_expert_mode.png and b/tests/integration/stax/snapshots/test_sign_transfer/enabled_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/expert_mode_splash.png b/tests/integration/stax/snapshots/test_sign_transfer/expert_mode_splash.png new file mode 100644 index 000000000..5bc079b4f Binary files /dev/null and b/tests/integration/stax/snapshots/test_sign_transfer/expert_mode_splash.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/operation_sign.png b/tests/integration/stax/snapshots/test_sign_transfer/operation_sign.png index f5efd4db0..86df262c7 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/operation_sign.png and b/tests/integration/stax/snapshots/test_sign_transfer/operation_sign.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_sign_transfer/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_sign_transfer/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/signing_successful.png b/tests/integration/stax/snapshots/test_sign_transfer/signing_successful.png index a21279c8a..a24543af4 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/signing_successful.png and b/tests/integration/stax/snapshots/test_sign_transfer/signing_successful.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/tst_expert_splash.png b/tests/integration/stax/snapshots/test_sign_transfer/tst_expert_splash.png deleted file mode 100644 index 824d4453b..000000000 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/tst_expert_splash.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_001.png b/tests/integration/stax/snapshots/test_sign_transfer/tst_review_001.png index 1b8de0032..2307a8814 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_001.png and b/tests/integration/stax/snapshots/test_sign_transfer/tst_review_001.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_002.png b/tests/integration/stax/snapshots/test_sign_transfer/tst_review_002.png index 93c6756f5..ac9f785e6 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_002.png and b/tests/integration/stax/snapshots/test_sign_transfer/tst_review_002.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_003.png b/tests/integration/stax/snapshots/test_sign_transfer/tst_review_003.png index 93af184c9..d48444ff1 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_003.png and b/tests/integration/stax/snapshots/test_sign_transfer/tst_review_003.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_004.png b/tests/integration/stax/snapshots/test_sign_transfer/tst_review_004.png deleted file mode 100644 index afb0c5601..000000000 Binary files a/tests/integration/stax/snapshots/test_sign_transfer/tst_review_004.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_skip/operation_0_transaction.png b/tests/integration/stax/snapshots/test_sign_transfer_skip/operation_0_transaction.png deleted file mode 100644 index fa9e55209..000000000 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_skip/operation_0_transaction.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enable_expert_mode.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enable_expert_mode.png index ce99c8d59..2721dadfa 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enable_expert_mode.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enable_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enabled_expert_mode.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enabled_expert_mode.png index 959148f04..b3b023d25 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enabled_expert_mode.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/enabled_expert_mode.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/expert_mode_splash.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/expert_mode_splash.png index 824d4453b..5bc079b4f 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/expert_mode_splash.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/expert_mode_splash.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/operation_sign.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/operation_sign.png index f5efd4db0..86df262c7 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/operation_sign.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/operation_sign.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_0.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_0.png index 1b8de0032..2307a8814 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_0.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_0.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_1.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_1.png index 93c6756f5..ac9f785e6 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_1.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_1.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_2.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_2.png index 93af184c9..d48444ff1 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_2.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_2.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_3.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_3.png deleted file mode 100644 index afb0c5601..000000000 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_3.png and /dev/null differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_request_sign_operation.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_request_sign_operation.png index b78886a69..f63326a66 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_request_sign_operation.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/review_request_sign_operation.png differ diff --git a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/signing_successful.png b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/signing_successful.png index a21279c8a..a24543af4 100644 Binary files a/tests/integration/stax/snapshots/test_sign_transfer_without_hash/signing_successful.png and b/tests/integration/stax/snapshots/test_sign_transfer_without_hash/signing_successful.png differ diff --git a/tests/integration/stax/test_basic.py b/tests/integration/stax/test_basic.py index 7c53fd4c4..59ab4c4f5 100755 --- a/tests/integration/stax/test_basic.py +++ b/tests/integration/stax/test_basic.py @@ -18,29 +18,27 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() - app.welcome.info() - app.assert_screen("settings_blindsigning_off") + app.welcome.settings() + app.assert_settings() + app.settings.toggle_blindsigning() + app.assert_settings(blindsigning=True) - app.settings_toggle_blindsigning() - app.assert_screen("settings_blindsigning_on") + app.settings.toggle_expert_mode() + app.assert_settings(blindsigning=True, expert_mode=True) - app.settings_toggle_expert_mode() - app.assert_screen("settings_blindsigning_expert_on") + app.settings.toggle_blindsigning() + app.assert_settings(expert_mode=True) - app.settings_toggle_blindsigning() - app.assert_screen("settings_expert_on") + app.settings.toggle_expert_mode() + app.assert_settings() - app.settings_toggle_expert_mode() - app.assert_screen("settings_blindsigning_off") + app.settings.next() + app.assert_info() - - app.info.next() - app.assert_screen(SCREEN_INFO_PAGE, True) - - app.info.multi_page_exit() - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.settings.exit() + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_blindsign_too_deep.py b/tests/integration/stax/test_blindsign_too_deep.py index 7182a583a..0d5c33628 100755 --- a/tests/integration/stax/test_blindsign_too_deep.py +++ b/tests/integration/stax/test_blindsign_too_deep.py @@ -18,63 +18,55 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # Blindsigning disabled (default state) send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen("tbtd_review_0") - app.review.tap() + app.review.next() app.assert_screen("too_deep_enable_blindsign") - app.choice.confirm() - - app.assert_screen("blindsign_enabled") - app.review.tap() + with app.fading_screen("blindsign_enabled"): + app.review.enable_blindsign.confirm() app.assert_screen("blindsign_warning") - app.welcome.client.pause_ticker() - app.review.tap() - app.assert_screen("loading_operation") - app.welcome.client.resume_ticker() + with app.fading_screen("loading_operation"): + app.review.next() app.send_apdu("800f82001211020000000c02000000070200000002002a") app.assert_screen("tbtd_review_1") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "93070b00990e4cf29c31f6497307bea0ad86a9d0dc08dba8b607e8dc0e23652f8309e41ed87ac1d33006806b688cfcff7632c4fbe499ff3ea4983ae4f06dea7790ec25db045689bca2c63967b5c563aabff86c4ef163bff92af3bb2ca9392d099000" app.review_confirm_signing(expected_apdu) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # Blindsign enabled app.welcome.settings() - app.assert_screen("settings_blindsigning_on") + app.assert_settings(blindsigning=True) # blind sign will be on because of previous test run. - app.info.multi_page_exit() + app.settings.exit() - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app,"800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen("tbtd_review_0") - app.review.tap() + app.review.next() app.assert_screen("too_deep_blindsign_notify") - app.review.client.resume_ticker() - app.choice.confirm() - + app.review.next() app.assert_screen("blindsign_warning") - app.welcome.client.pause_ticker() - app.review.tap() - app.assert_screen("loading_operation") - app.welcome.client.resume_ticker() + with app.fading_screen("loading_operation"): + app.review.next() app.send_apdu("800f82001211020000000c02000000070200000002002a") app.assert_screen("tbtd_review_1") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") diff --git a/tests/integration/stax/test_blindsign_too_deep_rejections.py b/tests/integration/stax/test_blindsign_too_deep_rejections.py index 3b77cac18..6672ef22a 100755 --- a/tests/integration/stax/test_blindsign_too_deep_rejections.py +++ b/tests/integration/stax/test_blindsign_too_deep_rejections.py @@ -15,97 +15,81 @@ from utils import * -def toggle_blindsigning(): - app.assert_screen(SCREEN_HOME_DEFAULT, True) +def toggle_blindsigning(app): + app.assert_home() app.welcome.settings() - app.settings_toggle_blindsigning() - app.info.multi_page_exit() - app.assert_screen(SCREEN_HOME_DEFAULT, True) - -def toggle_expert_mode(): - app.assert_screen(SCREEN_HOME_DEFAULT, True) - app.welcome.settings() - app.settings_toggle_expert_mode() - app.info.multi_page_exit() - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.settings.toggle_blindsigning() + app.settings.exit() + app.assert_home() if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # Rejecting at error screen (blindsign disabled) send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen("too_deep_expression") - app.review.tap() + app.review.next() verify_err_reject_response(app, "too_deep_enable_blindsign") # Rejecting at error screen (blindsign enabled) - toggle_blindsigning() # Enable blindsigning - app.assert_screen(SCREEN_HOME_DEFAULT, True) + toggle_blindsigning(app) # Enable blindsigning send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen("too_deep_expression") - app.review.tap() + app.review.next() verify_err_reject_response(app, "too_deep_blindsign_notify") # Rejecting at blindsigning splash screen - toggle_blindsigning() # Disable blindsigning at home - app.settings_toggle_blindsigning() + toggle_blindsigning(app) # Disable blindsigning at home send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen("too_deep_expression") - app.review.tap() + app.review.next() app.assert_screen("too_deep_enable_blindsign") - app.choice.confirm() - app.assert_screen("blindsign_enabled") - app.review.tap() + with app.fading_screen("blindsign_enabled"): + app.review.enable_blindsign.confirm() verify_err_reject_response(app,"blindsign_warning") # Rejecting at blindsign review screen - toggle_blindsigning() # Disable blindsigning at home + toggle_blindsigning(app) # Disable blindsigning at home send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen("too_deep_expression") - app.review.tap() + app.review.next() app.assert_screen("too_deep_enable_blindsign") - app.choice.confirm() - app.assert_screen("blindsign_enabled") - app.review.tap() + with app.fading_screen("blindsign_enabled"): + app.review.enable_blindsign.confirm() app.assert_screen("blindsign_warning") - app.welcome.client.pause_ticker() - app.review.tap() - app.assert_screen("loading_operation") - app.welcome.client.resume_ticker() + with app.fading_screen("loading_operation"): + app.review.next() app.send_apdu("800f82001211020000000c02000000070200000002002a") verify_err_reject_response(app,"tbtd_review_1") # Rejecting at final sign operation screen - toggle_blindsigning() # Disable blindsigning at home + toggle_blindsigning(app) # Disable blindsigning at home send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen("too_deep_expression") - app.review.tap() + app.review.next() app.assert_screen("too_deep_enable_blindsign") - app.choice.confirm() - app.assert_screen("blindsign_enabled") - app.review.tap() + with app.fading_screen("blindsign_enabled"): + app.review.enable_blindsign.confirm() app.assert_screen("blindsign_warning") - app.welcome.client.pause_ticker() - app.review.tap() - app.assert_screen("loading_operation") - app.welcome.client.resume_ticker() + with app.fading_screen("loading_operation"): + app.review.next() app.send_apdu("800f82001211020000000c02000000070200000002002a") app.assert_screen("tbtd_review_1") - app.review.tap() + app.review.next() verify_err_reject_response(app,"operation_sign") app.quit() diff --git a/tests/integration/stax/test_blindsign_too_large.py b/tests/integration/stax/test_blindsign_too_large.py index 47898f6dd..ee55acf24 100755 --- a/tests/integration/stax/test_blindsign_too_large.py +++ b/tests/integration/stax/test_blindsign_too_large.py @@ -19,53 +19,48 @@ app = stax_app(__file__) # Switch to blindsign mode - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # Blindsigning disabled (default state) send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f810028050092abf8e3d9e5f8cfd9ae8a9fe5f28ea1d5b5abf1af82dae8a4b68df3d1889eb6f988f5e8d31a") - app.review.tap() + app.review.next() app.assert_screen("too_large_enable_blindsign") - app.welcome.client.pause_ticker() - app.choice.confirm() - - app.assert_screen("blindsign_enabled") - app.welcome.client.resume_ticker() - - app.review.tap() + with app.fading_screen("blindsign_enabled"): + app.review.enable_blindsign.confirm() app.assert_screen("blindsign_warning") - app.review.tap() + app.review.next() app.assert_screen("tbtl_review_1") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "ef565fa445d815cd77518a4d14ce90b7a536627455f0930c9dbfa22a75d478d83e2bcb333ba0d639dd28c1b77c5860e552ab02092a50a57f1424f573278230ab8ba81d8a40956415278a27e3f28cae64d1f1f13bf613e6e9a57035e9e14511029000" app.review_confirm_signing(expected_apdu) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # Blindsign enabled app.welcome.settings() - app.assert_screen("settings_blindsigning_on") + app.assert_settings(blindsigning=True) # blind sign will be on because of previous test run. - app.info.multi_page_exit() + app.settings.exit() - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app,"800f810028050092abf8e3d9e5f8cfd9ae8a9fe5f28ea1d5b5abf1af82dae8a4b68df3d1889eb6f988f5e8d31a") - app.review.tap() + app.review.next() app.assert_screen("too_large_blindsign_notify") - app.choice.confirm() + app.review.next() app.assert_screen("blindsign_warning") - app.review.tap() + app.review.next() app.assert_screen("tbtl_review_1") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "ef565fa445d815cd77518a4d14ce90b7a536627455f0930c9dbfa22a75d478d83e2bcb333ba0d639dd28c1b77c5860e552ab02092a50a57f1424f573278230ab8ba81d8a40956415278a27e3f28cae64d1f1f13bf613e6e9a57035e9e14511029000" diff --git a/tests/integration/stax/test_blindsign_valid.py b/tests/integration/stax/test_blindsign_valid.py index 482cc1bd0..c8685cd45 100755 --- a/tests/integration/stax/test_blindsign_valid.py +++ b/tests/integration/stax/test_blindsign_valid.py @@ -22,44 +22,37 @@ app = stax_app(__file__) # Switch to blindsign mode - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.welcome.settings() - app.assert_screen("settings_blindsigning_off") + app.assert_settings() - app.settings_toggle_blindsigning() - app.assert_screen("settings_blindsigning_on") + app.settings.toggle_blindsigning() + app.assert_settings(blindsigning=True) - app.info.multi_page_exit() - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.settings.exit() + app.assert_home() - app.send_apdu("800f000011048000002c800006c18000000080000000"); - app.expect_apdu_return("9000"); + send_initialize_msg(app,"800f000011048000002c800006c18000000080000000") + send_payload(app,"800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") - app.assert_screen("review_request_sign_operation"); - - app.send_apdu("800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316"); - - app.review.tap() + app.review.next() app.assert_screen("tst_review_001") - app.review.tap() + app.review.next() app.assert_screen("tst_review_002") - app.review.tap() - app.assert_screen("tst_review_003") - - app.review.tap() + app.review.next() app.expert_mode_splash() - app.review.tap() - app.assert_screen("tst_review_004") + app.review.next() + app.assert_screen("tst_review_003") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "f6d5fa0e79cac216e25104938ac873ca17ee9d7f06763719293b413cf2ed475cf63d045a1cc9f73eee5775c5d496fa9d3aa9ae57fb97217f746a8728639795b7b2220e84ce5759ed111399ea3263d810c230d6a4fffcb6e82797c5ca673a17089000" app.review_confirm_signing(expected_apdu) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_expert_mode_rejections.py b/tests/integration/stax/test_expert_mode_rejections.py index 8ce06e105..46730736d 100755 --- a/tests/integration/stax/test_expert_mode_rejections.py +++ b/tests/integration/stax/test_expert_mode_rejections.py @@ -22,36 +22,30 @@ def sign_transfer_initialize(app): - app.assert_screen(SCREEN_HOME_DEFAULT, True) - app.send_apdu("800f000011048000002c800006c18000000080000000"); - app.expect_apdu_return("9000"); - app.assert_screen("review_request_sign_operation"); - app.send_apdu("800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316"); - app.review.tap() - app.assert_screen(f"tst_review_001") - app.review.tap() + app.assert_home() + send_initialize_msg(app,"800f000011048000002c800006c18000000080000000") + send_payload(app,"800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") + app.review.next() + app.assert_screen("tst_review_001") + app.review.next() app.assert_screen("tst_review_002") - app.review.tap() - app.assert_screen("tst_review_003") - if __name__ == "__main__": app = stax_app(__file__) # Reject from enable expert mode sign_transfer_initialize(app) - app.review.tap() + app.review.next() verify_reject_response(app,"enable_expert_mode") # Reject from expert mode splash sign_transfer_initialize(app) - app.review.tap() + app.review.next() app.enable_expert_mode() - app.review.tap() verify_reject_response(app, "expert_mode_splash") # Now with expert mode enabled, reject from splash screen. sign_transfer_initialize(app) - app.review.tap() + app.review.next() verify_reject_response(app, "expert_mode_splash") diff --git a/tests/integration/stax/test_get_pk.py b/tests/integration/stax/test_get_pk.py index 049145e94..70a6452b2 100755 --- a/tests/integration/stax/test_get_pk.py +++ b/tests/integration/stax/test_get_pk.py @@ -18,10 +18,10 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("8002000011048000002c800006c18000000080000000") app.expect_apdu_return("2102747884d9abdf16b3ab745158925f567e222f71225501826fa83347f6cbe9c3939000") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_git.py b/tests/integration/stax/test_git.py index 613dd505b..7bfa928a8 100755 --- a/tests/integration/stax/test_git.py +++ b/tests/integration/stax/test_git.py @@ -18,10 +18,10 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("8009000000") app.expect_apdu_return(app.commit+"00"+"9000") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_mixing_command.py b/tests/integration/stax/test_mixing_command.py index d9b4acc25..b8ca23afd 100755 --- a/tests/integration/stax/test_mixing_command.py +++ b/tests/integration/stax/test_mixing_command.py @@ -18,7 +18,7 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # INS_VERSION in INS_SIGN app.send_apdu("8004000011048000002c800006c18000000080000000") @@ -56,5 +56,5 @@ app.send_apdu("8009000000") app.expect_apdu_failure("9001") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_parsing_errors.py b/tests/integration/stax/test_parsing_errors.py index f69750289..5c0b4e5bb 100755 --- a/tests/integration/stax/test_parsing_errors.py +++ b/tests/integration/stax/test_parsing_errors.py @@ -20,87 +20,78 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # original operation : 0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316 print("Invalid input: Unknown magic bytes") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f81005e0100000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") - app.review.tap() + app.review.next() verify_err_reject_response(app, "invalid_tag") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f81005e03000000000000000000000000000000000000000000000000000000000000000001016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") - app.review.tap() + app.review.next() verify_err_reject_response(app, "invalid_tag") print("Invalid input: 1 byte removed inside") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f81005d0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e010000000000000000000000000000000000000000ff02000000020316") - app.review.tap() + app.review.next() app.assert_screen("tpe_review_0_01") - app.review.tap() - app.assert_screen("tpe_review_0_02_partial") - app.review.tap() - app.assert_screen("tpe_review_0_03") - app.review.tap() + app.review.next() + app.assert_screen("tpe_review_0_02") + app.review.next() verify_err_reject_response(app, "invalid_tag") print("Invalid input: 1 byte introduce at the end") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f81005f0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff0200000002031645") - app.review.tap() + app.review.next() app.assert_screen("tpe_review_0_01") - app.review.tap() + app.review.next() app.assert_screen("tpe_review_0_02_full") - app.review.tap() - app.assert_screen("tpe_review_0_03_full") - app.review.tap() + app.review.next() app.expert_mode_splash() - app.review.tap() - app.assert_screen("tpe_review_0_04_full") - app.review.tap() - + app.review.next() + app.assert_screen("tpe_review_0_03_full") + app.review.next() verify_err_reject_response(app, "invalid_tag") print("Invalid input: 1 byte introduced inside") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f81005f0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e0100000000000000000000000000000000000000000000ff02000000020316") - app.review.tap() + app.review.next() app.assert_screen("tpe_review_0_01") - app.review.tap() + app.review.next() app.assert_screen("tpe_review_0_02_dest_only") - app.review.tap() + app.review.next() verify_err_reject_response(app, "invalid_tag") # full output: 12345678901234567890123456789012345678901234567890123456789012345678901234567890 print("Too Large input") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f810028050092abf8e3d9e5f8cfd9ae8a9fe5f28ea1d5b5abf1af82dae8a4b68df3d1889eb6f988f5e8d31a") - app.review.tap() + app.review.next() verify_err_reject_response(app, "too_large") # full output: {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{42}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} print("Too Deep expression") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f0100eb0502000000f702000000f202000000ed02000000e802000000e302000000de02000000d902000000d402000000cf02000000ca02000000c502000000c002000000bb02000000b602000000b102000000ac02000000a702000000a2020000009d02000000980200000093020000008e02000000890200000084020000007f020000007a02000000750200000070020000006b02000000660200000061020000005c02000000570200000052020000004d02000000480200000043020000003e02000000390200000034020000002f020000002a02000000250200000020020000001b020000001602000000") - app.review.tap() + app.review.next() app.assert_screen('tpe_review_too_deep_0') - app.review.tap() + app.review.next() verify_err_reject_response(app, "too_deep") print("wrong last packet") send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") send_payload(app, "800f8100eb030000000000000000000000000000000000000000000000000000000000000000ce00ffdd6102321bc251e4a5190ad5b12b251069d9b4904e02030400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c63966303966323935326433343532386337333366393436313563666333396263353535363139666335353064643461363762613232303863653865383637616133643133613665663939646662653332633639373461613961323135306432316563613239633333343965353963313362393038316631") - - app.review.tap() + app.review.next() app.assert_screen("tpe_review_1_01") - # No error screen <- issue with packet framing protocol - app.review.tap() - app.assert_screen("tpe_review_1_02") - app.review.tap() + app.review.next() app.expect_apdu_failure("9002") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_provide_pk.py b/tests/integration/stax/test_provide_pk.py index b4c0e7b4b..156155c28 100755 --- a/tests/integration/stax/test_provide_pk.py +++ b/tests/integration/stax/test_provide_pk.py @@ -16,31 +16,28 @@ from utils import * -# "Show as QR" button position -show_qr_position=(200, 275) - if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("8003000011048000002c800006c18000000080000000") app.assert_screen("screen_verify_address") - app.provide_pk.tap() + app.provide_pk.next() app.assert_screen("screen_show_address_tz1_zebra") - app.provide_pk.client.finger_touch(*show_qr_position) + app.provide_pk.show_qr() app.assert_screen("screen_show_address_tz1_zebra_qrcode") app.provide_pk.exit_qr() app.assert_screen("screen_show_address_tz1_zebra") - app.provide_pk.confirm() - app.assert_screen("address_verified") + with app.fading_screen("address_verified"): + app.provide_pk.confirm() - app.provide_pk.tap() + app.provide_pk.next() app.expect_apdu_return("2102747884d9abdf16b3ab745158925f567e222f71225501826fa83347f6cbe9c3939000") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_provide_pk_reject.py b/tests/integration/stax/test_provide_pk_reject.py index dfcb93365..df884d899 100755 --- a/tests/integration/stax/test_provide_pk_reject.py +++ b/tests/integration/stax/test_provide_pk_reject.py @@ -16,20 +16,19 @@ from utils import * def short_reject(app): - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("8003000011048000002c800006c18000000080000000") app.assert_screen("screen_verify_address") - app.provide_pk.tap() + app.provide_pk.next() app.assert_screen("screen_show_address_tz1_zebra") - app.provide_pk.cancel() - app.assert_screen("address_rejected") + with app.fading_screen("address_rejected"): + app.provide_pk.cancel() app.expect_apdu_failure("6985") - app.review.tap() - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() if __name__ == "__main__": app = stax_app(__file__) diff --git a/tests/integration/stax/test_reject_review_operation.py b/tests/integration/stax/test_reject_review_operation.py index 55d6fa891..8951aa07b 100755 --- a/tests/integration/stax/test_reject_review_operation.py +++ b/tests/integration/stax/test_reject_review_operation.py @@ -21,21 +21,17 @@ # path: m/44'/1729'/0'/0' def short_reject(app): - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() - app.send_apdu("800f000011048000002c800006c18000000080000000") - app.expect_apdu_return("9000") + send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") + send_payload(app, "800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") - app.send_apdu("800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316"); - - app.assert_screen("review_request_sign_operation") - - app.review_reject_signing(confirmRejection = False) + app.review_reject_signing(cancel_rejection=True) # Cancelling rejection lands us back on the same page app.assert_screen("review_request_sign_operation") - app.review_reject_signing(confirmRejection = True) + app.review_reject_signing() - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.expect_apdu_failure("6985") if __name__ == "__main__": diff --git a/tests/integration/stax/test_reject_transfer.py b/tests/integration/stax/test_reject_transfer.py index b890bdcbe..923337821 100755 --- a/tests/integration/stax/test_reject_transfer.py +++ b/tests/integration/stax/test_reject_transfer.py @@ -23,13 +23,13 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("800f000011048000002c800006c18000000080000000") app.expect_apdu_return("9000") app.assert_screen("review_request_sign_operation") - app.review.tap() + app.review.next() # Ensure we don't advance to a blank screen app.assert_screen("review_request_sign_operation") @@ -42,5 +42,5 @@ app.review_reject_signing() app.expect_apdu_failure("6985") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_sign_execute_outbox_messages.py b/tests/integration/stax/test_sign_execute_outbox_messages.py index c086e2fcb..37e1373a8 100755 --- a/tests/integration/stax/test_sign_execute_outbox_messages.py +++ b/tests/integration/stax/test_sign_execute_outbox_messages.py @@ -22,39 +22,30 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() - app.send_apdu("800f000011048000002c800006c18000000080000000"); - app.expect_apdu_return("9000"); - - app.assert_screen("review_request_sign_operation"); - - app.send_apdu("800f0100eb030000000000000000000000000000000000000000000000000000000000000000ce00ffdd6102321bc251e4a5190ad5b12b251069d9b4904e02030400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c63966303966323935326433343532386337333366393436313563666333396263353535363139666335353064643461363762613232303863653865383637616133643133613665663939646662653332633639373461613961323135306432316563613239633333343965353963313362393038316631"); - - app.review.tap() + send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") + send_payload(app, "800f0100eb030000000000000000000000000000000000000000000000000000000000000000ce00ffdd6102321bc251e4a5190ad5b12b251069d9b4904e02030400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c63966303966323935326433343532386337333366393436313563666333396263353535363139666335353064643461363762613232303863653865383637616133643133613665663939646662653332633639373461613961323135306432316563613239633333343965353963313362393038316631") + app.review.next() app.assert_screen("tseom_review_00") - - app.review.tap() - app.assert_screen("tseom_review_01") - app.review.tap() + app.review.next() app.expect_apdu_return("9000") app.send_apdu("800f82004f63313162343430616334643334353564656462653465653064653135613861663632306434633836323437643964313332646531626236646132336435666639643864666664613232626139613834") - app.assert_screen("tseom_review_02") - app.review.tap() + app.assert_screen("tseom_review_01") + app.review.next() app.expert_mode_splash() - - for i in range(4): - app.review.tap() + for i in range(3): + app.review.next() app.assert_screen(f"operation_proof_396...834_{i}") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "c08f5e1a02d15b05c4066b43fc31aa1ccad30f6c7a18f44723e5af0b6584292236e919219e90793ef502e8883f5317206277607438695933fcb954f4ef451db19628a114880836193c755ddda4bf188b9764231975b2c5ecb64bc4bdc9c459039000" app.review_confirm_signing(expected_apdu) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_sign_transfer.py b/tests/integration/stax/test_sign_transfer.py index c98b16f63..a9cfe4da8 100755 --- a/tests/integration/stax/test_sign_transfer.py +++ b/tests/integration/stax/test_sign_transfer.py @@ -23,69 +23,50 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() - app.send_apdu("800f000011048000002c800006c18000000080000000"); - app.expect_apdu_return("9000"); + send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") + send_payload(app, "800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") + app.review.next() + app.assert_screen("tst_review_001") - app.assert_screen("review_request_sign_operation"); - - app.send_apdu("800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316"); - - app.review.tap() - app.assert_screen(f"tst_review_001") - - app.review.tap() + app.review.next() app.assert_screen("tst_review_002") - app.review.tap() - app.assert_screen("tst_review_003") + app.review.next() + app.expert_mode_splash() - app.review.tap() - app.enable_expert_mode() - - app.review.tap() - app.assert_screen("tst_expert_splash") - - app.review.tap() - app.assert_screen("tst_review_004") + app.review.next() + app.assert_screen("tst_review_003") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "f6d5fa0e79cac216e25104938ac873ca17ee9d7f06763719293b413cf2ed475cf63d045a1cc9f73eee5775c5d496fa9d3aa9ae57fb97217f746a8728639795b7b2220e84ce5759ed111399ea3263d810c230d6a4fffcb6e82797c5ca673a17089000" app.review_confirm_signing(expected_apdu) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # Now with expert enabled - app.send_apdu("800f000011048000002c800006c18000000080000000"); - app.expect_apdu_return("9000"); + send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") + send_payload(app, "800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") + app.review.next() + app.assert_screen("tst_review_001") - app.assert_screen("review_request_sign_operation"); - - app.send_apdu("800f81005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316"); - - app.review.tap() - app.assert_screen(f"tst_review_001") - - app.review.tap() + app.review.next() app.assert_screen("tst_review_002") - app.review.tap() - app.assert_screen("tst_review_003") - - app.review.tap() - app.assert_screen("tst_expert_splash") + app.review.next() + app.assert_screen("expert_mode_splash") - app.review.tap() - app.assert_screen("tst_review_004") + app.review.next() + app.assert_screen("tst_review_003") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "f6d5fa0e79cac216e25104938ac873ca17ee9d7f06763719293b413cf2ed475cf63d045a1cc9f73eee5775c5d496fa9d3aa9ae57fb97217f746a8728639795b7b2220e84ce5759ed111399ea3263d810c230d6a4fffcb6e82797c5ca673a17089000" app.review_confirm_signing(expected_apdu) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_sign_transfer_without_hash.py b/tests/integration/stax/test_sign_transfer_without_hash.py index dcd26c7d6..b5b16beea 100755 --- a/tests/integration/stax/test_sign_transfer_without_hash.py +++ b/tests/integration/stax/test_sign_transfer_without_hash.py @@ -23,35 +23,27 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() - app.send_apdu("8004000011048000002c800006c18000000080000000"); - app.expect_apdu_return("9000"); - - app.assert_screen("review_request_sign_operation"); - - app.send_apdu("800481005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316"); - - app.review.tap() + send_initialize_msg(app, "8004000011048000002c800006c18000000080000000") + send_payload(app, "800481005e0300000000000000000000000000000000000000000000000000000000000000006c016e8874874d31c3fbd636e924d5a036a43ec8faa7d0860308362d80d30e01000000000000000000000000000000000000000000ff02000000020316") + app.review.next() app.assert_screen("review_0") - app.review.tap() + app.review.next() app.assert_screen("review_1") - app.review.tap() - app.assert_screen("review_2") - - app.review.tap() + app.review.next() app.expert_mode_splash() - app.review.tap() - app.assert_screen("review_3") + app.review.next() + app.assert_screen("review_2") - app.review.tap() + app.review.next() app.assert_screen("operation_sign") expected_apdu = "f63d045a1cc9f73eee5775c5d496fa9d3aa9ae57fb97217f746a8728639795b7b2220e84ce5759ed111399ea3263d810c230d6a4fffcb6e82797c5ca673a17089000" app.review_confirm_signing(expected_apdu) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_unimplemented_commands.py b/tests/integration/stax/test_unimplemented_commands.py index 3c1439b8f..3b2856849 100755 --- a/tests/integration/stax/test_unimplemented_commands.py +++ b/tests/integration/stax/test_unimplemented_commands.py @@ -18,7 +18,7 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # INS_AUTHORIZE_BAKING app.send_apdu("8001000000") @@ -64,5 +64,5 @@ app.send_apdu("80ff000000") app.expect_apdu_failure("6d00") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_version.py b/tests/integration/stax/test_version.py index 348c8a4c9..b6de9b06d 100755 --- a/tests/integration/stax/test_version.py +++ b/tests/integration/stax/test_version.py @@ -18,10 +18,10 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("8000000000") app.expect_apdu_return(app.version+"9000") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_wrong_apdu_length.py b/tests/integration/stax/test_wrong_apdu_length.py index c15538190..ea502e8a6 100755 --- a/tests/integration/stax/test_wrong_apdu_length.py +++ b/tests/integration/stax/test_wrong_apdu_length.py @@ -18,12 +18,12 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("800000000000") app.expect_apdu_failure("917e") app.send_apdu("8000000001") app.expect_apdu_failure("917e") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_wrong_class.py b/tests/integration/stax/test_wrong_class.py index 3eededb0d..1d9e46e30 100755 --- a/tests/integration/stax/test_wrong_class.py +++ b/tests/integration/stax/test_wrong_class.py @@ -18,10 +18,10 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("0000000000") app.expect_apdu_failure("6e00") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_wrong_derivation_path.py b/tests/integration/stax/test_wrong_derivation_path.py index 0755ca3d1..6620f52c8 100755 --- a/tests/integration/stax/test_wrong_derivation_path.py +++ b/tests/integration/stax/test_wrong_derivation_path.py @@ -18,7 +18,7 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # INS_GET_PUBLIC_KEY app.send_apdu("8002000011058000002c800006c18000000080000000") @@ -51,5 +51,5 @@ app.expect_apdu_failure("917e") app.send_apdu("800f0000110b8000002c800006c1800000008000000080000000800000008000000080000000800000008000000080000000") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_wrong_derivation_type.py b/tests/integration/stax/test_wrong_derivation_type.py index fd5257381..53da7e14c 100755 --- a/tests/integration/stax/test_wrong_derivation_type.py +++ b/tests/integration/stax/test_wrong_derivation_type.py @@ -18,7 +18,7 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # INS_GET_PUBLIC_KEY app.send_apdu("8002000411048000002c800006c18000000080000000") @@ -36,5 +36,5 @@ app.send_apdu("800f000411048000002c800006c18000000080000000") app.expect_apdu_failure("6b00") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_wrong_index.py b/tests/integration/stax/test_wrong_index.py index 626cb471d..3f6613cdc 100755 --- a/tests/integration/stax/test_wrong_index.py +++ b/tests/integration/stax/test_wrong_index.py @@ -18,7 +18,7 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() # INS_GET_PUBLIC_KEY app.send_apdu("8002010011048000002c800006c18000000080000000") @@ -32,5 +32,5 @@ app.send_apdu("8003800011048000002c800006c18000000080000000") app.expect_apdu_failure("6b00") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/test_wrong_instructions.py b/tests/integration/stax/test_wrong_instructions.py index e052b192f..7e0c68e01 100755 --- a/tests/integration/stax/test_wrong_instructions.py +++ b/tests/integration/stax/test_wrong_instructions.py @@ -18,7 +18,7 @@ if __name__ == "__main__": app = stax_app(__file__) - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.send_apdu("8001000000") app.expect_apdu_failure("6d00") @@ -26,5 +26,5 @@ app.send_apdu("8010000000") app.expect_apdu_failure("6d00") - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.quit() diff --git a/tests/integration/stax/utils.py b/tests/integration/stax/utils.py index f41f6b838..681939416 100644 --- a/tests/integration/stax/utils.py +++ b/tests/integration/stax/utils.py @@ -17,22 +17,33 @@ import time from pathlib import Path +from typing import Generator, List from contextlib import contextmanager -from requests.exceptions import (ChunkedEncodingError, ConnectionError) +from requests.exceptions import ChunkedEncodingError -from ragger.backend import SpeculosBackend +from ragger.backend import BackendInterface, SpeculosBackend from ragger.backend.interface import RaisePolicy from ragger.firmware import Firmware +from ragger.firmware.touch.element import Center from ragger.firmware.touch.screen import MetaScreen -from ragger.firmware.touch.use_cases import UseCaseHomeExt, UseCaseSettings, UseCaseAddressConfirmation, UseCaseReview, UseCaseChoice +from ragger.firmware.touch.use_cases import ( + UseCaseHomeExt, + UseCaseSettings as OriginalUseCaseSettings, + UseCaseAddressConfirmation as OriginalUseCaseAddressConfirmation, + UseCaseReview as OriginalUseCaseReview, + UseCaseChoice as OriginalUseCaseChoice +) from ragger.firmware.touch.layouts import ChoiceList -from ragger.firmware.touch.positions import STAX_BUTTON_LOWER_LEFT, STAX_BUTTON_LOWER_RIGHT, STAX_BUTTON_ABOVE_LOWER_MIDDLE, STAX_BUTTON_LOWER_MIDDLE +from ragger.firmware.touch.positions import ( + Position, + STAX_BUTTON_LOWER_LEFT, + STAX_BUTTON_ABOVE_LOWER_MIDDLE, + STAX_BUTTON_LOWER_RIGHT, + STAX_BUTTON_LOWER_MIDDLE +) MAX_ATTEMPTS = 50 -SCREEN_HOME_DEFAULT = "home" -SCREEN_INFO_PAGE = "info" - def with_retry(f, attempts=MAX_ATTEMPTS): while True: try: @@ -45,27 +56,150 @@ def with_retry(f, attempts=MAX_ATTEMPTS): # Give plenty of time for speculos to update - can take a long time on CI machines time.sleep(0.5) -class TezosAppScreen(metaclass=MetaScreen): - use_case_welcome = UseCaseHomeExt - use_case_info = UseCaseSettings - use_case_provide_pk = UseCaseAddressConfirmation - use_case_review = UseCaseReview - use_case_choice = UseCaseChoice +class UseCaseChoice(OriginalUseCaseChoice): + """Extension of UseCaseChoice for our app.""" + + # Fixed in Ragger v1.21.0 + def reject(self) -> None: + """Tap on reject button.""" + self.client.finger_touch(*STAX_BUTTON_LOWER_LEFT) + +class UseCaseReview(OriginalUseCaseReview): + """Extension of UseCaseReview for our app.""" + + reject_tx: UseCaseChoice + enable_expert: UseCaseChoice + enable_blindsign: UseCaseChoice + + _center: Center + + def __init__(self, client: BackendInterface, firmware: Firmware): + super().__init__(client, firmware) + self.reject_tx = UseCaseChoice(client, firmware) + self.enable_expert = UseCaseChoice(client, firmware) + self.enable_blindsign = UseCaseChoice(client, firmware) + self._center = Center(client, firmware) + + def next(self) -> None: + """Pass to the next screen.""" + self._center.swipe_left() + + # Fixed in Ragger v1.21.0 + def tap(self) -> None: + """Tap on screen.""" + self.client.finger_touch(*STAX_BUTTON_LOWER_RIGHT) + + # Fixed in Ragger v1.21.0 + def previous(self) -> None: + """Tap on screen.""" + self.client.finger_touch(*STAX_BUTTON_LOWER_MIDDLE) + + # Fixed in Ragger v1.21.0 + def reject(self) -> None: + """Tap on reject button.""" + self.client.finger_touch(*STAX_BUTTON_LOWER_LEFT) + +class UseCaseAddressConfirmation(OriginalUseCaseAddressConfirmation): + """Extension of UseCaseAddressConfirmation for our app.""" + + _center: Center + + QR_POSITION = Position(STAX_BUTTON_LOWER_LEFT.x, STAX_BUTTON_ABOVE_LOWER_MIDDLE.y) + + def __init__(self, client: BackendInterface, firmware: Firmware): + super().__init__(client, firmware) + self._center = Center(client, firmware) + + def next(self) -> None: + """Pass to the next screen.""" + self._center.swipe_left() + + @property + def qr_position(self) -> Position: + """Position of the qr code.""" + return UseCaseAddressConfirmation.QR_POSITION - __backend = None - __golden = False - __stax = None - __snapshotted = [] - __settings = None + def show_qr(self) -> None: + """Tap to show qr code.""" + self.client.finger_touch(*self.qr_position) - def __init__(self, backend, firmware, commit, version, snapshot_prefix): + # Fixed in Ragger v1.21.0 + def cancel(self) -> None: + """Tap on cancel button.""" + self.client.finger_touch(*STAX_BUTTON_LOWER_LEFT) + +class UseCaseSettings(OriginalUseCaseSettings): + """Extension of UseCaseSettings for our app.""" + + _toggle_list: ChoiceList + + def __init__(self, client: BackendInterface, firmware: Firmware): + super().__init__(client, firmware) + self._toggle_list = ChoiceList(client, firmware) + + def toggle_expert_mode(self): + """Toggle the expert_mode switch.""" + self._toggle_list.choose(1) + + def toggle_blindsigning(self): + """Toggle the blindsigning switch.""" + self._toggle_list.choose(2) + + def exit(self) -> None: + """Exits settings.""" + self.multi_page_exit() + + # Fixed in Ragger v1.21.0 + STAX_BUTTON_LOWER_MIDDLE_RIGHT = Position(266, 615) + def previous(self) -> None: + """Tap on cancel button.""" + self.client.finger_touch(*UseCaseSettings.STAX_BUTTON_LOWER_MIDDLE_RIGHT) + +class TezosAppScreen(metaclass=MetaScreen): + use_case_welcome = UseCaseHomeExt + use_case_settings = UseCaseSettings + use_case_provide_pk = UseCaseAddressConfirmation + use_case_review = UseCaseReview + + welcome: UseCaseHomeExt + settings: UseCaseSettings + provide_pk: UseCaseAddressConfirmation + review: UseCaseReview + + commit: str + version: str + + __backend: BackendInterface + __golden: bool + __snapshots_path: str + __stax: str + __snapshotted: List[str] = [] + + def __init__(self, + backend: BackendInterface, + _firmware: Firmware, + commit: str, + version: str, + snapshot_prefix: str, + golden: bool = False): self.__backend = backend realpath = os.path.realpath(__file__) self.__snapshots_path = f"{os.path.dirname(realpath)}/snapshots" self.__stax = f"{os.path.dirname(realpath)}/snapshots/{Path(snapshot_prefix).stem}" - self.__settings = ChoiceList(backend, firmware) self.commit = commit self.version = version + self.__golden = golden + if golden: + # Setup for golden + path = f"{self.__stax}/" + Path(path).mkdir(parents=True, exist_ok=True) + for filename in os.listdir(path): + os.remove(os.path.join(path, filename)) + path = f"{self.__snapshots_path}" + home_path=os.path.join(path, "home.png") + info_path=os.path.join(path, "info.png") + if os.path.exists(home_path): os.remove(home_path) + if os.path.exists(info_path): os.remove(info_path) def send_apdu(self, data): """Send hex-encoded bytes to the apdu""" @@ -103,18 +237,23 @@ def check(): with_retry(check) - def make_golden(self): - self.__golden = True - path = f"{self.__stax}/" - Path(path).mkdir(parents=True, exist_ok=True) - for filename in os.listdir(path): - os.remove(os.path.join(path, filename)) - path = f"{self.__snapshots_path}" - home_path=os.path.join(path, "home.png") - info_path=os.path.join(path, "info.png") - if os.path.exists(home_path): os.remove(home_path) - if os.path.exists(info_path): os.remove(info_path) + def assert_home(self): + self.assert_screen("home", True) + def assert_info(self): + self.assert_screen("info", True) + + def assert_settings(self, + blindsigning = False, + expert_mode = False): + suffix="" + if blindsigning: + suffix += "_blindsigning" + if expert_mode: + suffix += "_expert" + if suffix != "": + suffix += "_on" + self.assert_screen("settings" + suffix) def quit(self): if os.getenv("NOQUIT") == None: @@ -126,13 +265,20 @@ def quit(self): pass else: - input(f"PRESS ENTER to continue next test\n- You may need to reset to home") + input("PRESS ENTER to continue next test\n- You may need to reset to home") - def settings_toggle_expert_mode(self): - self.__settings.choose(1) + @contextmanager + def manual_ticker(self) -> Generator[None, None, None]: + self.__backend.pause_ticker() + yield + self.__backend.resume_ticker() - def settings_toggle_blindsigning(self): - self.__settings.choose(2) + @contextmanager + def fading_screen(self, screen) -> Generator[None, None, None]: + with self.manual_ticker(): + yield + self.assert_screen(screen) + self.review.tap() # Not waiting for the screen to fade on its own def start_loading_operation(self, first_packet): """ @@ -140,44 +286,33 @@ def start_loading_operation(self, first_packet): We ensure that the loading operation screen is shown. """ - self.welcome.client.pause_ticker() - self.send_apdu(first_packet) - self.assert_screen("loading_operation") - self.welcome.client.resume_ticker() + with self.fading_screen("loading_operation"): + self.send_apdu(first_packet) self.expect_apdu_return("9000") def review_confirm_signing(self, expected_apdu): - self.welcome.client.pause_ticker() - self.review.confirm() - self.assert_screen("signing_successful") - self.review.tap() + with self.fading_screen("signing_successful"): + self.review.confirm() self.expect_apdu_return(expected_apdu) - def enable_expert_mode(self, expert_enabled=False): - if not expert_enabled: - self.assert_screen("enable_expert_mode") - self.welcome.client.finger_touch(STAX_BUTTON_ABOVE_LOWER_MIDDLE.x, STAX_BUTTON_ABOVE_LOWER_MIDDLE.y) - self.assert_screen("enabled_expert_mode") + def enable_expert_mode(self): + self.assert_screen("enable_expert_mode") + with self.fading_screen("enabled_expert_mode"): + self.review.enable_expert.confirm() - def expert_mode_splash(self, expert_enabled=False): - self.enable_expert_mode(expert_enabled) - self.review.tap() + def expert_mode_splash(self): + self.enable_expert_mode() self.assert_screen("expert_mode_splash") - - - def review_reject_signing(self, confirmRejection = True): - self.welcome.client.finger_touch(STAX_BUTTON_LOWER_LEFT.x, STAX_BUTTON_LOWER_RIGHT.y) + def review_reject_signing(self, cancel_rejection = False): + self.review.reject() # Rejection confirmation page self.assert_screen("confirm_rejection") - if confirmRejection: - self.welcome.client.pause_ticker() - self.welcome.client.finger_touch(STAX_BUTTON_ABOVE_LOWER_MIDDLE.x, STAX_BUTTON_ABOVE_LOWER_MIDDLE.y) - self.assert_screen("reject_review") - self.review.tap() - self.welcome.client.resume_ticker() + if cancel_rejection: + self.review.reject_tx.reject() else: - self.welcome.client.finger_touch(STAX_BUTTON_LOWER_MIDDLE.x, STAX_BUTTON_LOWER_MIDDLE.y) + with self.fading_screen("reject_review"): + self.review.reject_tx.confirm() def stax_app(prefix) -> TezosAppScreen: port = os.environ["PORT"] @@ -185,29 +320,23 @@ def stax_app(prefix) -> TezosAppScreen: version = os.environ["VERSION_BYTES"] golden = os.getenv("GOLDEN") != None backend = SpeculosBackend("__unused__", Firmware.STAX,args=["--api-port", port]) - app = TezosAppScreen(backend, Firmware.STAX, commit, version, prefix) - - if golden: - app.make_golden() - - return app + return TezosAppScreen(backend, Firmware.STAX, commit, version, prefix, golden) def assert_home_with_code(app, code): - app.assert_screen(SCREEN_HOME_DEFAULT, True) + app.assert_home() app.expect_apdu_failure(code) def send_initialize_msg(app, apdu): app.send_apdu(apdu) app.expect_apdu_return("9000") - - app.assert_screen("review_request_sign_operation"); + app.assert_screen("review_request_sign_operation") def send_payload(app, apdu): app.send_apdu(apdu) - app.assert_screen("review_request_sign_operation"); + app.assert_screen("review_request_sign_operation") def verify_err_reject_response(app, tag): - verify_reject_response_common(app,tag,"9405") + verify_reject_response_common(app, tag, "9405") def verify_reject_response(app, tag): verify_reject_response_common(app, tag,"6985") @@ -216,9 +345,6 @@ def verify_reject_response_common(app, tag, err_code): app.assert_screen(tag) app.review.reject() app.assert_screen("reject_review") - app.welcome.client.pause_ticker() - app.welcome.client.finger_touch(STAX_BUTTON_ABOVE_LOWER_MIDDLE.x, STAX_BUTTON_ABOVE_LOWER_MIDDLE.y) - app.assert_screen("rejected") - app.review.tap() - app.welcome.client.resume_ticker() + with app.fading_screen("rejected"): + app.review.reject_tx.confirm() assert_home_with_code(app, err_code)