diff --git a/tests/snapshots/flex/test_app_mainmenu/00000.png b/tests/snapshots/flex/test_app_mainmenu/00000.png new file mode 100644 index 000000000..8a1cfc78f Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00000.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00001.png b/tests/snapshots/flex/test_app_mainmenu/00001.png new file mode 100644 index 000000000..69c445349 Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00001.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00002.png b/tests/snapshots/flex/test_app_mainmenu/00002.png new file mode 100644 index 000000000..0afcd1f19 Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00002.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00003.png b/tests/snapshots/flex/test_app_mainmenu/00003.png new file mode 100644 index 000000000..de3c8eeda Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00003.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00004.png b/tests/snapshots/flex/test_app_mainmenu/00004.png new file mode 100644 index 000000000..7e3ea6486 Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00004.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00005.png b/tests/snapshots/flex/test_app_mainmenu/00005.png new file mode 100644 index 000000000..0afcd1f19 Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00005.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00006.png b/tests/snapshots/flex/test_app_mainmenu/00006.png new file mode 100644 index 000000000..0d44ede43 Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00006.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00007.png b/tests/snapshots/flex/test_app_mainmenu/00007.png new file mode 100644 index 000000000..8a1cfc78f Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00007.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_accepted/00000.png b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00000.png new file mode 100644 index 000000000..ef72acad8 Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_accepted/00001.png b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00001.png new file mode 100644 index 000000000..d66525e25 Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_accepted/00002.png b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00002.png new file mode 100644 index 000000000..4321e6018 Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_accepted/00003.png b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00003.png new file mode 100644 index 000000000..8a1cfc78f Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_accepted/00003.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_refused/00000.png b/tests/snapshots/flex/test_get_public_key_confirm_refused/00000.png new file mode 100644 index 000000000..ef72acad8 Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_refused/00000.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_refused/00001.png b/tests/snapshots/flex/test_get_public_key_confirm_refused/00001.png new file mode 100644 index 000000000..d66525e25 Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_refused/00001.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_refused/00002.png b/tests/snapshots/flex/test_get_public_key_confirm_refused/00002.png new file mode 100644 index 000000000..45c08d4e7 Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_refused/00002.png differ diff --git a/tests/snapshots/flex/test_get_public_key_confirm_refused/00003.png b/tests/snapshots/flex/test_get_public_key_confirm_refused/00003.png new file mode 100644 index 000000000..8a1cfc78f Binary files /dev/null and b/tests/snapshots/flex/test_get_public_key_confirm_refused/00003.png differ diff --git a/tests/snapshots/flex/test_sign_tx_long_tx/00000.png b/tests/snapshots/flex/test_sign_tx_long_tx/00000.png new file mode 100644 index 000000000..926a0e3ea Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_long_tx/00000.png differ diff --git a/tests/snapshots/flex/test_sign_tx_long_tx/00001.png b/tests/snapshots/flex/test_sign_tx_long_tx/00001.png new file mode 100644 index 000000000..fe19c3f36 Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_long_tx/00001.png differ diff --git a/tests/snapshots/flex/test_sign_tx_long_tx/00002.png b/tests/snapshots/flex/test_sign_tx_long_tx/00002.png new file mode 100644 index 000000000..c73f5879b Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_long_tx/00002.png differ diff --git a/tests/snapshots/flex/test_sign_tx_long_tx/00003.png b/tests/snapshots/flex/test_sign_tx_long_tx/00003.png new file mode 100644 index 000000000..be51a9d55 Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_long_tx/00003.png differ diff --git a/tests/snapshots/flex/test_sign_tx_long_tx/00004.png b/tests/snapshots/flex/test_sign_tx_long_tx/00004.png new file mode 100644 index 000000000..8a1cfc78f Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_long_tx/00004.png differ diff --git a/tests/snapshots/flex/test_sign_tx_refused/00000.png b/tests/snapshots/flex/test_sign_tx_refused/00000.png new file mode 100644 index 000000000..926a0e3ea Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_refused/00000.png differ diff --git a/tests/snapshots/flex/test_sign_tx_refused/00001.png b/tests/snapshots/flex/test_sign_tx_refused/00001.png new file mode 100644 index 000000000..fe19c3f36 Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_refused/00001.png differ diff --git a/tests/snapshots/flex/test_sign_tx_refused/00002.png b/tests/snapshots/flex/test_sign_tx_refused/00002.png new file mode 100644 index 000000000..c73f5879b Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_refused/00002.png differ diff --git a/tests/snapshots/flex/test_sign_tx_refused/00003.png b/tests/snapshots/flex/test_sign_tx_refused/00003.png new file mode 100644 index 000000000..08bca2231 Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_refused/00003.png differ diff --git a/tests/snapshots/flex/test_sign_tx_refused/00004.png b/tests/snapshots/flex/test_sign_tx_refused/00004.png new file mode 100644 index 000000000..6bbdf2ff3 Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_refused/00004.png differ diff --git a/tests/snapshots/flex/test_sign_tx_refused/00005.png b/tests/snapshots/flex/test_sign_tx_refused/00005.png new file mode 100644 index 000000000..8a1cfc78f Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_refused/00005.png differ diff --git a/tests/snapshots/flex/test_sign_tx_short_tx/00000.png b/tests/snapshots/flex/test_sign_tx_short_tx/00000.png new file mode 100644 index 000000000..926a0e3ea Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_short_tx/00000.png differ diff --git a/tests/snapshots/flex/test_sign_tx_short_tx/00001.png b/tests/snapshots/flex/test_sign_tx_short_tx/00001.png new file mode 100644 index 000000000..fe19c3f36 Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_short_tx/00001.png differ diff --git a/tests/snapshots/flex/test_sign_tx_short_tx/00002.png b/tests/snapshots/flex/test_sign_tx_short_tx/00002.png new file mode 100644 index 000000000..c73f5879b Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_short_tx/00002.png differ diff --git a/tests/snapshots/flex/test_sign_tx_short_tx/00003.png b/tests/snapshots/flex/test_sign_tx_short_tx/00003.png new file mode 100644 index 000000000..be51a9d55 Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_short_tx/00003.png differ diff --git a/tests/snapshots/flex/test_sign_tx_short_tx/00004.png b/tests/snapshots/flex/test_sign_tx_short_tx/00004.png new file mode 100644 index 000000000..8a1cfc78f Binary files /dev/null and b/tests/snapshots/flex/test_sign_tx_short_tx/00004.png differ diff --git a/tests/test_app_mainmenu.py b/tests/test_app_mainmenu.py index b9cece4a5..1fd72fc68 100644 --- a/tests/test_app_mainmenu.py +++ b/tests/test_app_mainmenu.py @@ -1,16 +1,17 @@ +from ragger.firmware import Firmware from ragger.navigator import NavInsID, NavIns # In this test we check the behavior of the device main menu def test_app_mainmenu(firmware, navigator, test_name, default_screenshot_path): # Navigate in the main menu - if firmware.device.startswith("nano"): + if firmware.is_nano: instructions = [ NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK ] - else: + elif firmware is Firmware.STAX: instructions = [ NavInsID.USE_CASE_HOME_SETTINGS, NavIns(NavInsID.TOUCH, (200, 113)), @@ -20,5 +21,15 @@ def test_app_mainmenu(firmware, navigator, test_name, default_screenshot_path): NavInsID.USE_CASE_SETTINGS_NEXT, NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT ] + elif firmware is Firmware.FLEX: + instructions = [ + NavInsID.USE_CASE_HOME_SETTINGS, + NavIns(NavInsID.TOUCH, (200, 113)), + NavIns(NavInsID.TOUCH, (200, 300)), + NavInsID.USE_CASE_CHOICE_CONFIRM, + NavIns(NavInsID.TOUCH, (200, 300)), + NavInsID.USE_CASE_SETTINGS_NEXT, + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT + ] navigator.navigate_and_compare(default_screenshot_path, test_name, instructions, screen_change_before_first_instruction=False)