diff --git a/.clang-format b/.clang-format index b4abfa0..d65f1ce 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,6 @@ --- BasedOnStyle: Google IndentWidth: 4 ---- Language: Cpp ColumnLimit: 100 PointerAlignment: Right @@ -12,7 +11,6 @@ SortIncludes: false SpaceAfterCStyleCast: true AllowShortCaseLabelsOnASingleLine: false AllowAllArgumentsOnNextLine: false -AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Never AllowShortFunctionsOnASingleLine: None BinPackArguments: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f2fb620..1f89884 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,11 @@ # Checklist + + - [ ] App update process has been followed - [ ] Target branch is `develop` - [ ] Application version has been bumped - diff --git a/.github/workflows/build_and_functional_tests.yml b/.github/workflows/build_and_functional_tests.yml index 99d7838..592e821 100644 --- a/.github/workflows/build_and_functional_tests.yml +++ b/.github/workflows/build_and_functional_tests.yml @@ -15,7 +15,7 @@ on: type: choice required: true default: 'Raise an error (default)' - description: CI behavior if the test snaphots are different than expected. + description: CI behavior if the test snapshots are different than expected. options: - 'Raise an error (default)' - 'Open a PR' @@ -30,21 +30,21 @@ on: jobs: build_application_nbgl_test: - name: Build application using the reusable workflow + name: Build nbgl_test application using the reusable workflow uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 with: upload_app_binaries_artifact: "compiled_app_binaries" flags: "COIN=nbgl_test" build_application_demo: - name: Build application using the reusable workflow + name: Build demo application using the reusable workflow uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 with: upload_app_binaries_artifact: "compiled_app_binaries_demo" flags: "COIN=demo" - + ragger_tests: - name: Run ragger tests using the reusable workflow + name: Run ragger tests on nbgl_test using the reusable workflow needs: build_application_nbgl_test uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1 with: diff --git a/.github/workflows/codeql_checks.yml b/.github/workflows/codeql_checks.yml index 2ac43ed..cc2aae4 100644 --- a/.github/workflows/codeql_checks.yml +++ b/.github/workflows/codeql_checks.yml @@ -17,20 +17,21 @@ jobs: analyse: name: Analyse strategy: + fail-fast: false matrix: - sdk: ["$STAX_SDK", "$FLEX_SDK"] - #'cpp' covers C and C++ - language: [ 'cpp' ] + sdk: ["$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK"] + # 'cpp' covers C and C++ + language: ['cpp'] runs-on: ubuntu-latest container: image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest steps: - name: Clone - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} queries: security-and-quality @@ -41,4 +42,4 @@ jobs: make BOLOS_SDK=${{ matrix.sdk }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/documentation_generation.yml b/.github/workflows/documentation_generation.yml index 1d00c2e..31b1efb 100644 --- a/.github/workflows/documentation_generation.yml +++ b/.github/workflows/documentation_generation.yml @@ -18,12 +18,12 @@ jobs: steps: - name: Clone - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: HTML documentation run: doxygen .doxygen/Doxyfile - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: documentation path: doc/html diff --git a/.github/workflows/misspellings_checks.yml b/.github/workflows/misspellings_checks.yml index 0333481..f38799e 100644 --- a/.github/workflows/misspellings_checks.yml +++ b/.github/workflows/misspellings_checks.yml @@ -18,11 +18,11 @@ jobs: name: Check misspellings runs-on: ubuntu-latest steps: - - name: Clone - uses: actions/checkout@v3 + - name: Clone + uses: actions/checkout@v4 - - name: Check misspellings - uses: codespell-project/actions-codespell@v1 - with: - builtin: clear,rare - check_filenames: true + - name: Check misspellings + uses: codespell-project/actions-codespell@v2 + with: + builtin: clear,rare + check_filenames: true diff --git a/.github/workflows/python_client_checks.yml b/.github/workflows/python_client_checks.yml index f221219..9524579 100644 --- a/.github/workflows/python_client_checks.yml +++ b/.github/workflows/python_client_checks.yml @@ -14,31 +14,28 @@ on: pull_request: jobs: - lint: name: NBGL_Tests client linting runs-on: ubuntu-latest steps: - - name: Clone - uses: actions/checkout@v3 - - name: Installing PIP dependencies - run: | - pip install pylint - pip install -r tests/requirements.txt - - name: Lint Python code - run: | - pylint --rc tests/setup.cfg tests/application_client/ + - name: Clone + uses: actions/checkout@v4 + - name: Installing PIP dependencies + run: | + pip install pylint + pip install -r tests/requirements.txt + - name: Lint Python code + run: pylint --rc tests/setup.cfg tests/application_client/ mypy: name: Type checking runs-on: ubuntu-latest steps: - - name: Clone - uses: actions/checkout@v3 - - name: Installing PIP dependencies - run: | - pip install mypy - pip install -r tests/requirements.txt - - name: Mypy type checking - run: | - mypy tests/application_client/ + - name: Clone + uses: actions/checkout@v4 + - name: Installing PIP dependencies + run: | + pip install mypy + pip install -r tests/requirements.txt + - name: Mypy type checking + run: mypy tests/application_client/ diff --git a/.gitignore b/.gitignore index 5fe0da1..51eb902 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,4 @@ doc/latex ledger/ # Vscode -.vscode/ \ No newline at end of file +.vscode/ diff --git a/.mdl.rb b/.mdl.rb new file mode 100644 index 0000000..0b971f6 --- /dev/null +++ b/.mdl.rb @@ -0,0 +1,11 @@ +# Style file for mdl +# https://github.com/markdownlint/markdownlint/blob/main/docs/creating_styles.md + +# Include all rules +all + +# Disable specific rules +#exclude_rule 'MD012' + +# Update rules configuration +rule 'MD013', :line_length => 120 diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..dd25d91 --- /dev/null +++ b/.mdlrc @@ -0,0 +1,14 @@ +# markdownlint config file + +# Use custom style file +style "#{File.dirname(__FILE__)}/.mdl.rb" + +# MD002 - First header in file should be a top level header +# MD005 - Inconsistent indentation for list items at the same level +# MD007 - Unordered list indentation +# MD014 - Dollar signs used before commands without showing output +# MD024 - Multiple headers with the same content +# MD029 - Ordered list item prefix +# MD033 - Inline HTML +# MD041 - First line in file should be a top level header +rules "~MD002,~MD005,~MD007,~MD014,~MD024,~MD029,~MD033,~MD041" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..89962c6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,47 @@ +# To install hooks, run: +# pre-commit install --hook-type pre-commit +# pre-commit install --hook-type commit-msg + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: mixed-line-ending + - id: check-added-large-files + - id: check-merge-conflict + - id: check-case-conflict + + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v12.0.1 + hooks: + - id: clang-format + types_or: [c] + + - repo: https://github.com/Mateusz-Grzelinski/actionlint-py + rev: v1.7.6.22 + hooks: + - id: actionlint + types_or: [yaml] + args: [-shellcheck='' -pyflakes=''] + + - repo: https://github.com/markdownlint/markdownlint + rev: v0.12.0 + hooks: + - id: markdownlint + types_or: [markdown] + + - repo: https://github.com/PyCQA/pylint + rev: v3.3.3 + hooks: + - id: pylint + language: system + types: [python] + args: ['--jobs=0', '--rcfile=tests/setup.cfg'] + files: '^tests/.*$' diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index d54f2e3..b6411fb 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,16 +1,13 @@ { "env": { - "BOLOS_SDK": "/opt/nanosplus-secure-sdk", - "BOLOS_ENV": "/opt/bolos-devenv" + "BOLOS_SDK": "/opt/ledger-secure-sdk" }, "configurations": [ { "name": "Nano S+", "includePath": [ - "/usr/include", - "${workspaceFolder}/src", - "${env:BOLOS_SDK}/include/*", - "${env:BOLOS_SDK}/lib_ux/include/*" + "${workspaceFolder}/src/**", + "${env:BOLOS_SDK}/**" ], "defines": [ "TARGET_NANOS2", @@ -31,10 +28,10 @@ "PATCH_VERSION=0", "IO_SEPROXYHAL_BUFFER_SIZE_B=128", "DEBUG=1", + "HAVE_PIEZO_SOUND", "HAVE_PRINTF", "PRINTF=screen_printf" ], - "compilerPath": "${env:BOLOS_ENV}/gcc-arm-none-eabi-5_3-2016q1/bin/arm-none-eabi-gcc", "cStandard": "c11", "cppStandard": "c++17", "intelliSenseMode": "gcc-arm", @@ -45,4 +42,4 @@ } ], "version": 4 -} \ No newline at end of file +} diff --git a/.vscode/launch.json b/.vscode/launch.json index 6b6ceec..f2c8419 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -23,4 +23,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9ed2c2d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,51 @@ +{ + "files.associations": { + "*.h": "c" + }, + "ledgerDevTools.appSettings": { + "selectedUseCase": "release", + "selectedDevice": "Stax", + "selectedVariant": "nbgl_test", + "testsList": [ + "test_app_mainmenu", + "test_generic_settings", + "test_generic_config", + "test_app_name", + "test_confirm", + "test_app_demo_flow_send_BTC", + "test_app_demo_flow_swap_1inch", + "test_app_demo_flow_BS_stake", + "test_app_demo_flow_SOL_receive", + "test_bad_cla", + "test_bad_ins", + "test_wrong_p1p2", + "test_wrong_data_length", + "test_keypad", + "test_keypad", + "test_get_app_and_version", + "test_navigation", + "test_navigation", + "test_navigation", + "test_navigation", + "test_navigation", + "test_spinner", + "test_use_case_address_review_accepted", + "test_use_case_long_address_review_accepted", + "test_use_case_long_address_review_accepted_with_tags", + "test_use_case_static_review_accepted", + "test_use_case_static_review_refused", + "test_use_case_light_review_accepted", + "test_use_case_light_review_refused", + "test_use_case_review_accepted", + "test_use_case_blind_signed_review_accepted", + "test_use_case_blind_signed_review_display_warning", + "test_use_case_review_refused", + "test_use_case_generic_review", + "test_use_case_streaming_review_accepted", + "test_use_case_blind_signed_streaming_review_accepted", + "test_use_case_streaming_review_accepted_with_more", + "test_use_case_streaming_review_refused", + "test_version" + ] + } +} diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..cbd9dc5 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,7 @@ +--- +extends: default + +rules: + document-start: disable + line-length: disable + truthy: disable diff --git a/APP_SPECIFICATION.md b/APP_SPECIFICATION.md index 2d23065..054e435 100644 --- a/APP_SPECIFICATION.md +++ b/APP_SPECIFICATION.md @@ -9,10 +9,10 @@ This documentation describes the APDU messages interface to communicate with the The application covers the following functionalities : - - Get a public NBGL_Tests address given a BIP 32 path - - Sign a basic NBGL_Tests transaction given a BIP 32 path and raw transaction - - Retrieve the NBGL_Tests app version - - Retrieve the NBGL_Tests app name +- Get a public NBGL_Tests address given a BIP 32 path +- Sign a basic NBGL_Tests transaction given a BIP 32 path and raw transaction +- Retrieve the NBGL_Tests app version +- Retrieve the NBGL_Tests app name The application interface can be accessed over HID or BLE @@ -53,7 +53,6 @@ The address can be optionally checked on the device before being returned. | Chain code length | 1 | | Chain code | var | - ### SIGN NBGL_Tests TRANSACTION #### Description @@ -86,7 +85,6 @@ The input data is the RLP encoded transaction streamed to the device in 255 byte | --- | --- | | Transaction chunk | variable | - ##### `Output data` | Description | Length | @@ -95,7 +93,6 @@ The input data is the RLP encoded transaction streamed to the device in 255 byte | Signature | variable | | v | 1 | - ### GET APP VERSION #### Description @@ -122,7 +119,6 @@ None | Application minor version | 01 | | Application patch version | 01 | - ### GET APP NAME #### Description @@ -132,6 +128,7 @@ This command returns NBGL_Tests application name #### Coding ##### `Command` + | CLA | INS | P1 | P2 | Lc | Le | | --- | --- | --- | --- | --- | ---| | E0 | 04 | 00 | 00 | 00 | 04 | @@ -141,32 +138,29 @@ This command returns NBGL_Tests application name None ##### `Output data` + | Description | Length | | --- | --- | | Application name | variable | - ## Status Words The following standard Status Words are returned for all APDUs. -##### `Status Words` - - | SW | SW name | Description | | --- | --- | --- | -| 6985 | SW_DENY | Rejected by user | +| 6985 | SW_DENY | Rejected by user | | 6A86 | SW_WRONG_P1P2 | Either P1 or P2 is incorrect | | 6A87 | SW_WRONG_DATA_LENGTH | Lc or minimum APDU length is incorrect | -| 6D00 | SW_INS_NOT_SUPPORTED | No command exists with INS | +| 6D00 | SW_INS_NOT_SUPPORTED | No command exists with INS | | 6E00 | SW_CLA_NOT_SUPPORTED | Bad CLA used for this application | | B000 | SW_WRONG_RESPONSE_LENGTH | Wrong response length (buffer size problem) | | B001 | SW_DISPLAY_BIP32_PATH_FAIL | BIP32 path conversion to string failed | | B002 | SW_DISPLAY_ADDRESS_FAIL | Address conversion to string failed | | B003 | SW_DISPLAY_AMOUNT_FAIL | Amount conversion to string failed | -| B004 | SW_WRONG_TX_LENGTH | Wrong raw transaction length | +| B004 | SW_WRONG_TX_LENGTH | Wrong raw transaction length | | B005 | SW_TX_PARSING_FAIL | Failed to parse raw transaction | -| B006 | SW_TX_HASH_FAIL | Failed to compute hash digest of raw transaction | +| B006 | SW_TX_HASH_FAIL | Failed to compute hash digest of raw transaction | | B007 | SW_BAD_STATE | Security issue with bad state | | B008 | SW_SIGNATURE_FAIL | Signature of raw transaction failed | -| 9000 | OK | Success | \ No newline at end of file +| 9000 | OK | Success | diff --git a/Makefile b/Makefile index d55f359..0f6e160 100644 --- a/Makefile +++ b/Makefile @@ -15,14 +15,7 @@ # limitations under the License. # **************************************************************************** -ifeq ($(BOLOS_SDK),) -$(error Environment variable BOLOS_SDK is not set) -endif - -USE_NBGL:=1 -ENABLE_NBGL_FOR_NANO_DEVICES := 1 - -include $(BOLOS_SDK)/Makefile.defines +include $(BOLOS_SDK)/Makefile.target ######################################## # Mandatory configuration # @@ -30,7 +23,7 @@ include $(BOLOS_SDK)/Makefile.defines # Application version APPVERSION_M = 1 -APPVERSION_N = 0 +APPVERSION_N = 1 APPVERSION_P = 0 APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" @@ -105,13 +98,16 @@ endif ######################################## ENABLE_BLUETOOTH = 1 #ENABLE_NFC = 1 +ENABLE_NBGL_FOR_NANO_DEVICES = 1 ######################################## # NBGL custom features # ######################################## ENABLE_NBGL_QRCODE = 1 #ENABLE_NBGL_KEYBOARD = 1 -#ENABLE_NBGL_KEYPAD = 1 +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_STAX TARGET_FLEX)) +ENABLE_NBGL_KEYPAD = 1 +endif ######################################## # Features disablers # @@ -124,8 +120,11 @@ ENABLE_NBGL_QRCODE = 1 #DISABLE_STANDARD_SNPRINTF = 1 #DISABLE_STANDARD_USB = 1 #DISABLE_STANDARD_WEBUSB = 1 -#DISABLE_STANDARD_BAGL_UX_FLOW = 1 #DISABLE_DEBUG_LEDGER_ASSERT = 1 #DISABLE_DEBUG_THROW = 1 +ifeq ($(BOLOS_SDK),) +$(error Environment variable BOLOS_SDK is not set) +endif + include $(BOLOS_SDK)/Makefile.standard_app diff --git a/README.md b/README.md index c8398e4..91fa674 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ -[![Ensure compliance with Ledger guidelines](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/guidelines_enforcer.yml/badge.svg)](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/guidelines_enforcer.yml) [![Build and run functional tests using ragger through reusable workflow](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/build_and_functional_tests.yml/badge.svg?branch=master)](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/build_and_functional_tests.yml) +[![Ensure compliance with Ledger guidelines](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/guidelines_enforcer.yml/badge.svg)](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/guidelines_enforcer.yml) + +[![Build and run functional tests using ragger through reusable workflow](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/build_and_functional_tests.yml/badge.svg?branch=master)](https://github.com/LedgerHQ/app-nbgl-tests/actions/workflows/build_and_functional_tests.yml) # Ledger NBGL Tests Application -This application is designed to test various standard use cases of the NBGL graphical library. It provides a simple APDU interface which allows to trig the different use case flows. The application includes predefined parameters for each use case that demonstrate the capabilities of NBGL. +This application is designed to test various standard use cases of the NBGL graphical library. +It provides a simple APDU interface which allows to trig the different use case flows. +The application includes predefined parameters for each use case that demonstrate the capabilities of NBGL. It also ensures that there are no regression issues by using a set of tests. diff --git a/doc/APDU.md b/doc/APDU.md index 50bfe35..86f9111 100644 --- a/doc/APDU.md +++ b/doc/APDU.md @@ -1,13 +1,16 @@ # Application Protocol Data Unit (APDU) -The communication protocol used by [BOLOS](https://ledger.readthedocs.io/en/latest/bolos/overview.html) to exchange [APDU](https://en.wikipedia.org/wiki/Smart_card_application_protocol_data_unit) is very close to [ISO 7816-4](https://www.iso.org/standard/77180.html) with a few differences: +The communication protocol used by [BOLOS](https://ledger.readthedocs.io/en/latest/bolos/overview.html) +to exchange [APDU](https://en.wikipedia.org/wiki/Smart_card_application_protocol_data_unit) +is very close to [ISO 7816-4](https://www.iso.org/standard/77180.html) with a few differences: - `Lc` length is always exactly 1 byte - No `Le` field in APDU command - Maximum size of APDU command is 260 bytes: 5 bytes of header + 255 bytes of data - Maximum size of APDU response is 260 bytes: 258 bytes of response data + 2 bytes of status word -Status words tend to be similar to common [APDU responses](https://www.eftlab.com/knowledge-base/complete-list-of-apdu-responses/) in the industry. +Status words tend to be similar to common [APDU responses](https://www.eftlab.com/knowledge-base/complete-list-of-apdu-responses/) +in the industry. ## Command APDU diff --git a/glyphs/app_nbgl_tests_64px.png b/glyphs/app_nbgl_tests_64px.png old mode 100755 new mode 100644 diff --git a/glyphs/bitcoin_14px.gif b/glyphs/bitcoin_14px.gif new file mode 100644 index 0000000..7b7a4bb Binary files /dev/null and b/glyphs/bitcoin_14px.gif differ diff --git a/glyphs/ethereum_14px.gif b/glyphs/ethereum_14px.gif new file mode 100644 index 0000000..d70e8a7 Binary files /dev/null and b/glyphs/ethereum_14px.gif differ diff --git a/glyphs/info_button_14px.png b/glyphs/info_button_14px.png new file mode 100644 index 0000000..c6d29dd Binary files /dev/null and b/glyphs/info_button_14px.png differ diff --git a/glyphs/polygon_14px.gif b/glyphs/polygon_14px.gif new file mode 100644 index 0000000..7b09920 Binary files /dev/null and b/glyphs/polygon_14px.gif differ diff --git a/glyphs/solana_14px.gif b/glyphs/solana_14px.gif new file mode 100644 index 0000000..29de6d8 Binary files /dev/null and b/glyphs/solana_14px.gif differ diff --git a/icons/app_nbgl_tests_32px.png b/icons/app_nbgl_tests_32px.png old mode 100755 new mode 100644 diff --git a/icons/app_nbgl_tests_40px.png b/icons/app_nbgl_tests_40px.png old mode 100755 new mode 100644 diff --git a/ledger_app.toml b/ledger_app.toml index 08a150f..3ca01d3 100644 --- a/ledger_app.toml +++ b/ledger_app.toml @@ -1,7 +1,7 @@ [app] build_directory = "./" sdk = "C" -devices = ["stax", "flex"] +devices = ["nanox", "nanos+", "stax", "flex"] [tests] unit_directory = "./unit-tests/" diff --git a/src/apdu/dispatcher.c b/src/apdu/dispatcher.c index 458b34b..15541e4 100644 --- a/src/apdu/dispatcher.c +++ b/src/apdu/dispatcher.c @@ -43,13 +43,11 @@ int apdu_dispatcher(const command_t *cmd) { if (cmd->p1 != 0 || cmd->p2 != 0) { return io_send_sw(SW_WRONG_P1P2); } - return handler_get_version(); case GET_APP_NAME: if (cmd->p1 != 0 || cmd->p2 != 0) { return io_send_sw(SW_WRONG_P1P2); } - return handler_get_app_name(); case TEST_SPINNER: if (cmd->p1 != 0 || cmd->p2 != 0) { @@ -69,11 +67,16 @@ int apdu_dispatcher(const command_t *cmd) { } return ui_display_review(true); case TEST_USE_CASE_ADDRESS_REVIEW: - if (cmd->p1 == 0) { + if (cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + if (cmd->p1 == P1_ADDR_REVIEW_SHORT) { return ui_display_address_review(); - } else if (cmd->p1 == 1) { + } + if (cmd->p1 == P1_ADDR_REVIEW_LONG) { return ui_display_long_address_review(); - } else if (cmd->p1 == 2) { + } + if (cmd->p1 == P1_ADDR_REVIEW_TAGS) { return ui_display_long_address_review_with_tags(); } return io_send_sw(SW_WRONG_P1P2); @@ -102,6 +105,42 @@ int apdu_dispatcher(const command_t *cmd) { return io_send_sw(SW_WRONG_P1P2); } return ui_display_light_review(); + case TEST_USE_CASE_CONFIRM: + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_confirm(); + case TEST_USE_CASE_GENERIC_CONFIG: + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_generic_config(); + case TEST_USE_CASE_GENERIC_REVIEW: + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_generic_review(); + case TEST_USE_CASE_GENERIC_SETTINGS: + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_generic_settings(); + case TEST_USE_CASE_KEYPAD: + if (cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + if (cmd->p1 == P1_KEYPAD_DIGITS) { + return ui_display_keypad_digits(); + } + if (cmd->p1 == P1_KEYPAD_PIN) { + return ui_display_keypad_pin(); + } + return io_send_sw(SW_WRONG_P1P2); + case TEST_USE_CASE_NAVIGATION: + if (cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_navigation(cmd->p1); default: return io_send_sw(SW_INS_NOT_SUPPORTED); } diff --git a/src/apdu/dispatcher.h b/src/apdu/dispatcher.h index 191ce3f..4fbe59a 100644 --- a/src/apdu/dispatcher.h +++ b/src/apdu/dispatcher.h @@ -1,8 +1,7 @@ #pragma once #include "parser.h" - -#include "../types.h" +#include "types.h" /** * Parameter 2 for last APDU to receive. diff --git a/src/globals.h b/src/globals.h index fee5800..9aeebf2 100644 --- a/src/globals.h +++ b/src/globals.h @@ -8,21 +8,6 @@ #include "types.h" #include "constants.h" -/** - * Global buffer for interactions between SE and MCU. - */ -extern uint8_t G_io_seproxyhal_spi_buffer[IO_SEPROXYHAL_BUFFER_SIZE_B]; - -/** - * Global structure to perform asynchronous UX aside IO operations. - */ -extern ux_state_t G_ux; - -/** - * Global structure with the parameters to exchange with the BOLOS UX application. - */ -extern bolos_ux_params_t G_ux_params; - /** * Global structure for NVM data storage. */ diff --git a/src/handler/get_app_name.c b/src/handler/get_app_name.c index 5879ba6..1e0ede9 100644 --- a/src/handler/get_app_name.c +++ b/src/handler/get_app_name.c @@ -21,10 +21,10 @@ #include "buffer.h" #include "get_app_name.h" -#include "../constants.h" -#include "../globals.h" -#include "../sw.h" -#include "../types.h" +#include "constants.h" +#include "globals.h" +#include "sw.h" +#include "types.h" int handler_get_app_name() { _Static_assert(APPNAME_LEN < MAX_APPNAME_LEN, "APPNAME must be at most 64 characters!"); diff --git a/src/handler/get_version.c b/src/handler/get_version.c index db54632..d304eae 100644 --- a/src/handler/get_version.c +++ b/src/handler/get_version.c @@ -23,10 +23,10 @@ #include "buffer.h" #include "get_version.h" -#include "../globals.h" -#include "../constants.h" -#include "../sw.h" -#include "../types.h" +#include "globals.h" +#include "constants.h" +#include "sw.h" +#include "types.h" int handler_get_version() { _Static_assert(APPVERSION_LEN == 3, "Length of (MAJOR || MINOR || PATCH) must be 3!"); diff --git a/src/types.h b/src/types.h index fbb1e39..0bfd774 100644 --- a/src/types.h +++ b/src/types.h @@ -20,5 +20,25 @@ typedef enum { TEST_USE_CASE_ADDRESS_REVIEW = 0x09, TEST_SPINNER = 0x0A, TEST_USE_CASE_STATIC_REVIEW = 0x0B, - TEST_USE_CASE_LIGHT_REVIEW = 0x0C + TEST_USE_CASE_LIGHT_REVIEW = 0x0C, + TEST_USE_CASE_CONFIRM = 0x0D, + TEST_USE_CASE_GENERIC_CONFIG = 0x0E, + TEST_USE_CASE_GENERIC_REVIEW = 0x0F, + TEST_USE_CASE_GENERIC_SETTINGS = 0x10, + TEST_USE_CASE_KEYPAD = 0x11, + TEST_USE_CASE_NAVIGATION = 0x12, } command_e; + +/** + * Constants with expected P1 of APDU commands. + */ +#define P1_ADDR_REVIEW_SHORT 0x00 +#define P1_ADDR_REVIEW_LONG 0x01 +#define P1_ADDR_REVIEW_TAGS 0x02 +#define P1_KEYPAD_DIGITS 0x00 +#define P1_KEYPAD_PIN 0x01 +#define P1_NAV_CONTENT_CENTERED_INFO 0x00 +#define P1_NAV_CONTENT_INFO_BUTTON 0x01 +#define P1_NAV_CONTENT_SWITCHES 0x02 +#define P1_NAV_CONTENT_CHOICES 0x03 +#define P1_NAV_CONTENT_BARS 0x04 diff --git a/src/ui/action/validate.c b/src/ui/action/validate.c index 5cdde7c..f8060b3 100644 --- a/src/ui/action/validate.c +++ b/src/ui/action/validate.c @@ -20,9 +20,9 @@ #include "crypto_helpers.h" #include "validate.h" -#include "../menu.h" -#include "../../sw.h" -#include "../../globals.h" +#include "menu.h" +#include "sw.h" +#include "globals.h" void validate_transaction(bool choice) { if (choice) { diff --git a/src/ui/display.h b/src/ui/display.h index 33c10e6..67bc92c 100644 --- a/src/ui/display.h +++ b/src/ui/display.h @@ -19,3 +19,10 @@ int ui_display_BTC_review(); int ui_display_SOL_address_review(); int ui_display_BS_staking_review(); int ui_display_swap_review(); +int ui_display_confirm(); +int ui_display_generic_config(); +int ui_display_generic_review(); +int ui_display_generic_settings(); +int ui_display_keypad_digits(); +int ui_display_keypad_pin(); +int ui_display_navigation(uint8_t nav_type); diff --git a/src/ui/menu.h b/src/ui/menu.h index e9e5cec..4853ae8 100644 --- a/src/ui/menu.h +++ b/src/ui/menu.h @@ -1,13 +1,23 @@ #pragma once #ifdef SCREEN_SIZE_NANO -#define LARGE_ICON C_app_nbgl_tests_16px -#define LARGE_WARNING_ICON C_icon_warning +#define ICON_APP C_app_nbgl_tests_16px +#define ICON_WARNING C_icon_warning +#define ICON_INFO C_info_button_14px +#define ICON_BITCOIN C_bitcoin_14px +#define ICON_SOLANA C_solana_14px +#define ICON_POLYGON C_polygon_14px +#define ICON_ETHEREUM C_ethereum_14px #else #if (APP_TYPE == APP_DEMO_TYPE) -#define LARGE_ICON C_app_demo_64px +#define ICON_APP C_app_demo_64px #else -#define LARGE_ICON C_app_nbgl_tests_64px +#define ICON_APP C_app_nbgl_tests_64px #endif -#define LARGE_WARNING_ICON C_Warning_64px +#define ICON_WARNING C_Warning_64px +#define ICON_INFO C_info_button_64px +#define ICON_BITCOIN C_bitcoin_64px +#define ICON_SOLANA C_solana_64px +#define ICON_POLYGON C_polygon_64px +#define ICON_ETHEREUM C_ethereum_64px #endif diff --git a/src/ui/menu_nbgl.c b/src/ui/menu_nbgl.c index 66494dc..fa7bb23 100644 --- a/src/ui/menu_nbgl.c +++ b/src/ui/menu_nbgl.c @@ -25,11 +25,9 @@ #include "globals.h" #include "menu.h" +#include "sw.h" -void app_quit(void) { - // exit app here - os_sched_exit(-1); -} +extern void app_exit(void); // ----------------------------------------------------------- // --------------- NBGL TEST HOME PAGE ----------------------- @@ -88,13 +86,13 @@ static void review_warning_choice(bool confirm) { // Reset setting menu to the right page nbgl_useCaseHomeAndSettings(APPNAME, - &LARGE_ICON, + &ICON_APP, NULL, initSettingPage, &settingContents, &infoList, &homeAction, - app_quit); + app_exit); } static void controls_callback(int token, uint8_t index, int page) { @@ -117,7 +115,7 @@ static void controls_callback(int token, uint8_t index, int page) { // to activate the dummy 2 setting if (!N_storage.dummy2_allowed) { // Display the warning message and ask the user to confirm - nbgl_useCaseChoice(&LARGE_WARNING_ICON, + nbgl_useCaseChoice(&ICON_WARNING, "Dummy 2", "Are you sure to\nallow dummy 2\nin transactions?", "I understand, confirm", @@ -156,13 +154,13 @@ void ui_menu_main_nbgl_test(void) { homeAction.icon = NULL; homeAction.text = "Display flows"; nbgl_useCaseHomeAndSettings(APPNAME, - &LARGE_ICON, + &ICON_APP, NULL, INIT_HOME_PAGE, &settingContents, &infoList, &homeAction, - app_quit); + app_exit); } // ----------------------------------------------------------- @@ -187,7 +185,7 @@ void ui_menu_main_demo(void) { homeActionDemo.icon = NULL; homeActionDemo.text = "View demos"; nbgl_useCaseHomeAndSettings(APPNAME, - &LARGE_ICON, + &ICON_APP, "Showcase transactions and\n" "address verification, without\n" "spending.", @@ -195,7 +193,7 @@ void ui_menu_main_demo(void) { NULL, &infoListDemo, &homeActionDemo, - app_quit); + app_exit); } // ----------------------------------------------------------- @@ -243,21 +241,67 @@ static void demo_control_cb(int token, uint8_t index) { } } -static bool nav_callback(uint8_t page, nbgl_pageContent_t* content) { +static bool nav_bar_cb(uint8_t page, nbgl_pageContent_t* content) { UNUSED(page); +#ifdef HAVE_PIEZO_SOUND content->tuneId = NBGL_NO_TUNE; +#endif content->type = BARS_LIST; content->barsList.barTexts = barTexts; content->barsList.tokens = tokens; content->barsList.nbBars = DEMO_FLOW_NB; +#ifdef HAVE_PIEZO_SOUND content->barsList.tuneId = TUNE_TAP_CASUAL; +#endif + return true; +} + +static bool nav_switch_cb(uint8_t page, nbgl_pageContent_t* content) { + UNUSED(page); + content->type = SWITCHES_LIST; + content->switchesList.nbSwitches = SETTINGS_SWITCHES_NB; + content->switchesList.switches = switches; + return true; +} + +#define CHOICES_NB 4 +static const char* const choicesTexts[CHOICES_NB] = {"Choice 1", + "Choice 2", + "Choice 3", + "Choice 4"}; + +static bool nav_choice_cb(uint8_t page, nbgl_pageContent_t* content) { + UNUSED(page); + content->type = CHOICES_LIST; + content->choicesList.names = choicesTexts; + content->choicesList.token = FIRST_USER_TOKEN; + content->choicesList.initChoice = 0; + content->choicesList.nbChoices = CHOICES_NB; + return true; +} + +static bool nav_button_cb(uint8_t page, nbgl_pageContent_t* content) { + UNUSED(page); + content->type = INFO_BUTTON; + content->infoButton.text = "Test info button"; + content->infoButton.icon = &ICON_APP; + content->infoButton.buttonText = "Press me"; + content->infoButton.buttonToken = 23; + return true; +} +static bool nav_info_cb(uint8_t page, nbgl_pageContent_t* content) { + UNUSED(page); + content->type = CENTERED_INFO; + content->centeredInfo.text1 = "Test centered info"; + content->centeredInfo.icon = &ICON_APP; + content->centeredInfo.text2 = "example text"; return true; } // display the list of demo flows void ui_display_demo_list(void) { - nbgl_useCaseNavigableContent("Select demo", 0, 1, ui_menu_main, nav_callback, demo_control_cb); + nbgl_useCaseNavigableContent("Select demo", 0, 1, ui_menu_main, nav_bar_cb, demo_control_cb); } void ui_menu_main(void) { @@ -267,4 +311,75 @@ void ui_menu_main(void) { ui_menu_main_nbgl_test(); } } + +static void quit_cb(void) { + io_send_sw(SW_OK); + ui_menu_main(); +} + +int ui_display_generic_config() { + nbgl_useCaseGenericConfiguration("Generic Config", 0, &settingContents, quit_cb); + return 0; +} + +int ui_display_generic_settings() { + nbgl_useCaseGenericSettings(APPNAME, 0, &settingContents, &infoList, quit_cb); + return 0; +} +static void nav_control_cb(int token, uint8_t index) { + UNUSED(token); + UNUSED(index); +} + +int ui_display_navigation(uint8_t nav_type) { + uint16_t sw = SW_OK; + switch (nav_type) { + case P1_NAV_CONTENT_CENTERED_INFO: + nbgl_useCaseNavigableContent("Centered Info", + 0, + 1, + ui_menu_main, + nav_info_cb, + nav_control_cb); + break; + case P1_NAV_CONTENT_INFO_BUTTON: + nbgl_useCaseNavigableContent("Info Button", + 0, + 1, + ui_menu_main, + nav_button_cb, + nav_control_cb); + break; + case P1_NAV_CONTENT_SWITCHES: + nbgl_useCaseNavigableContent("Switches List", + 0, + 1, + ui_menu_main, + nav_switch_cb, + nav_control_cb); + break; + case P1_NAV_CONTENT_CHOICES: + nbgl_useCaseNavigableContent("Choices List", + 0, + 1, + ui_menu_main, + nav_choice_cb, + nav_control_cb); + break; + case P1_NAV_CONTENT_BARS: + nbgl_useCaseNavigableContent("Bars List", + 0, + 1, + ui_menu_main, + nav_bar_cb, + nav_control_cb); + break; + default: + sw = SW_WRONG_P1P2; + break; + } + io_send_sw(sw); + return 0; +} + #endif diff --git a/src/ui/nbgl_display_address.c b/src/ui/nbgl_display_address.c index 56c305d..a0ba460 100644 --- a/src/ui/nbgl_display_address.c +++ b/src/ui/nbgl_display_address.c @@ -47,7 +47,7 @@ static void review_choice(bool confirm) { int ui_display_address_review() { nbgl_useCaseAddressReview("0xABCDEF1234", NULL, - &LARGE_ICON, + &ICON_APP, "Verify NBT address", NULL, review_choice); @@ -59,7 +59,7 @@ int ui_display_long_address_review() { "5A8FgbMkmG2e3J41sBdjvjaBUyz8qHohsQcGtRf63qEUTMBvmA45fp" "p5pSacMdSg7A3b71RejLzB8EkGbfjp5PELVHCRUaE", NULL, - &LARGE_ICON, + &ICON_APP, "Verify NBT address", NULL, review_choice); @@ -67,8 +67,8 @@ int ui_display_long_address_review() { } // 2 pairs of tag/value to display in second page -static nbgl_layoutTagValue_t pairs[2]; -static nbgl_layoutTagValueList_t pairList; +static nbgl_contentTagValue_t pairs[2]; +static nbgl_contentTagValueList_t pairList; int ui_display_long_address_review_with_tags() { // Setup data to display @@ -86,7 +86,7 @@ int ui_display_long_address_review_with_tags() { "5A8FgbMkmG2e3J41sBdjvjaBUyz8qHohsQcGtRf63qEUTMBvmA45fp" "p5pSacMdSg7A3b71RejLzB8EkGbfjp5PELVHCRUaE", &pairList, - &LARGE_ICON, + &ICON_APP, "Verify NBT address", NULL, review_choice); diff --git a/src/ui/nbgl_display_confirm.c b/src/ui/nbgl_display_confirm.c new file mode 100644 index 0000000..1844c7e --- /dev/null +++ b/src/ui/nbgl_display_confirm.c @@ -0,0 +1,35 @@ +/***************************************************************************** + * Ledger App NBGL_Tests. + * (c) 2020 Ledger SAS. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *****************************************************************************/ + +#ifdef HAVE_NBGL + +#include "nbgl_use_case.h" +#include "io.h" +#include "display.h" +#include "sw.h" + +static void callback(void) { + nbgl_useCaseStatus("Message OK", true, ui_menu_main); +} + +int ui_display_confirm() { + nbgl_useCaseConfirm("Do you confirm", "This message ?", "Confirm", "Cancel", callback); + io_send_sw(SW_OK); + return 0; +} + +#endif // HAVE_NBGL diff --git a/src/ui/nbgl_display_demo_flows.c b/src/ui/nbgl_display_demo_flows.c index fb2465b..dcf4f02 100644 --- a/src/ui/nbgl_display_demo_flows.c +++ b/src/ui/nbgl_display_demo_flows.c @@ -35,8 +35,8 @@ #include "validate.h" #include "menu.h" -static nbgl_layoutTagValue_t pairs[4]; -static nbgl_layoutTagValueList_t pairList; +static nbgl_contentTagValue_t pairs[4]; +static nbgl_contentTagValueList_t pairList; // called when long press button on 3rd page is long-touched or when reject footer is touched static void review_choice(bool confirm) { @@ -66,7 +66,7 @@ int ui_display_BTC_review() { // Start review flow nbgl_useCaseReview(TYPE_TRANSACTION, &pairList, - &C_bitcoin_64px, + &ICON_BITCOIN, "Review transaction\nto send Bitcoin (demo)", NULL, "Sign transaction to\n send Bitcoin? (demo)", @@ -88,7 +88,7 @@ static void review_choice_address_SOL(bool confirm) { int ui_display_SOL_address_review() { nbgl_useCaseAddressReview("7EcDhSYGxXyscszYEp35KHN8vvw3svAuLKTzXwCFLtV", NULL, - &C_solana_64px, + &ICON_SOLANA, "Verify Solana address\n(demo)", NULL, review_choice_address_SOL); @@ -114,7 +114,7 @@ int ui_display_BS_staking_review() { // Start blind-signing review flow nbgl_useCaseReviewBlindSigning(TYPE_TRANSACTION, &pairList, - &C_ethereum_64px, + &ICON_ETHEREUM, "Review transaction\n(demo)", NULL, "Accept risk and sign\ntransaction? (demo)", @@ -151,7 +151,7 @@ int ui_display_swap_review() { pairList.nbPairs = 4; pairList.pairs = pairs; - nbgl_tipBox_t tipBox = {.icon = &C_info_button_64px, + nbgl_tipBox_t tipBox = {.icon = &ICON_INFO, .text = "Interaction with a\nsmart contract from:\n1inch", .modalTitle = "Contract information", .infos.nbInfos = INFO_NB, @@ -163,7 +163,7 @@ int ui_display_swap_review() { nbgl_useCaseAdvancedReview(TYPE_TRANSACTION, &pairList, - &C_polygon_64px, + &ICON_POLYGON, "Review transaction to\nswap tokens (demo)", NULL, "Sign transaction to\nswap tokens? (demo)", diff --git a/src/ui/nbgl_display_keypad.c b/src/ui/nbgl_display_keypad.c new file mode 100644 index 0000000..87e98b0 --- /dev/null +++ b/src/ui/nbgl_display_keypad.c @@ -0,0 +1,94 @@ +/***************************************************************************** + * Ledger App NBGL_Tests. + * (c) 2020 Ledger SAS. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *****************************************************************************/ + +#ifdef HAVE_NBGL + +#include "nbgl_use_case.h" +#include "os.h" +#include "io.h" +#include "globals.h" +#include "display.h" +#include "sw.h" + +#define PIN_LEN 4 +#define PIN_VAL "5555" + +#ifdef NBGL_KEYPAD + +static void validate_cb(const uint8_t* entry, uint8_t length) { + bool isSuccess = (length == PIN_LEN) && (memcmp(entry, PIN_VAL, PIN_LEN) == 0); + io_send_sw(isSuccess ? SW_OK : SW_BAD_STATE); + nbgl_useCaseStatus("Pin Status", isSuccess, ui_menu_main); +} + +#ifdef SCREEN_SIZE_NANO +static void quit_cb(void) { + io_send_sw(SW_OK); + ui_menu_main(); +} +#else +static void quit_cb(int token, uint8_t index) { + UNUSED(index); + UNUSED(token); + io_send_sw(SW_OK); + ui_menu_main(); +} +#endif + +int ui_display_keypad_digits() { +#ifdef SCREEN_SIZE_NANO + nbgl_useCaseKeypadDigits("Digit Keypad (5555)", 4, 4, false, validate_cb, quit_cb); +#else + nbgl_useCaseKeypadDigits("Digit Keypad (5555)", + 4, + 4, + FIRST_USER_TOKEN, + false, + TUNE_TAP_CASUAL, + validate_cb, + quit_cb); +#endif + return 0; +} + +int ui_display_keypad_pin() { +#ifdef SCREEN_SIZE_NANO + nbgl_useCaseKeypadPIN("PIN Keypad (5555)", 4, 4, false, validate_cb, quit_cb); +#else + nbgl_useCaseKeypadPIN("PIN Keypad (5555)", + 4, + 4, + FIRST_USER_TOKEN, + false, + TUNE_TAP_CASUAL, + validate_cb, + quit_cb); +#endif + return 0; +} +#else // NBGL_KEYPAD +int ui_display_keypad_digits() { + io_send_sw(SW_INS_NOT_SUPPORTED); + return 0; +} + +int ui_display_keypad_pin() { + io_send_sw(SW_INS_NOT_SUPPORTED); + return 0; +} +#endif // NBGL_KEYPAD +#endif // HAVE_NBGL diff --git a/src/ui/nbgl_display_spinner.c b/src/ui/nbgl_display_spinner.c index 092431e..8591a1f 100644 --- a/src/ui/nbgl_display_spinner.c +++ b/src/ui/nbgl_display_spinner.c @@ -38,4 +38,4 @@ void app_ticker_event_callback(void) { } } -#endif // HAVE_NBGL \ No newline at end of file +#endif // HAVE_NBGL diff --git a/src/ui/nbgl_display_transaction.c b/src/ui/nbgl_display_transaction.c old mode 100755 new mode 100644 index 56a661d..3feabc2 --- a/src/ui/nbgl_display_transaction.c +++ b/src/ui/nbgl_display_transaction.c @@ -39,9 +39,10 @@ static char g_amount[30]; // Buffer where the transaction address string is written static char g_address[43]; +static char g_address_long[100]; -static nbgl_layoutTagValue_t pairs[3]; -static nbgl_layoutTagValueList_t pairList; +static nbgl_contentTagValue_t pairs[3]; +static nbgl_contentTagValueList_t pairList; // called when long press button on 3rd page is long-touched or when reject footer is touched static void review_choice(bool confirm) { @@ -81,7 +82,7 @@ int ui_display_review(bool is_blind_signed) { // Start blind-signing review flow nbgl_useCaseReviewBlindSigning(TYPE_TRANSACTION, &pairList, - &LARGE_ICON, + &ICON_APP, "Review transaction\nto send NBT", NULL, "Sign transaction\nto send NBT", @@ -91,7 +92,7 @@ int ui_display_review(bool is_blind_signed) { // Start review flow nbgl_useCaseReview(TYPE_TRANSACTION, &pairList, - &LARGE_ICON, + &ICON_APP, "Review transaction\nto send NBT", NULL, "Sign transaction\nto send NBT", @@ -156,14 +157,14 @@ int ui_display_streaming_review(bool is_blind_signed) { if (is_blind_signed) { // Start streaming blind-signing review flow nbgl_useCaseReviewStreamingBlindSigningStart(TYPE_TRANSACTION, - &LARGE_ICON, + &ICON_APP, "Review transaction\nto send NBT", NULL, onTransactionContinue); } else { // Start streaming review flow nbgl_useCaseReviewStreamingStart(TYPE_TRANSACTION, - &LARGE_ICON, + &ICON_APP, "Review transaction\nto send NBT", NULL, onTransactionContinue); @@ -172,4 +173,80 @@ int ui_display_streaming_review(bool is_blind_signed) { return 0; } +static void quit_cb(void) { + io_send_sw(SW_DENY); + ui_menu_main(); +} + +static void control_cb(int token, uint8_t index, int page) { + UNUSED(index); + UNUSED(page); + + if (token == FIRST_USER_TOKEN) { + io_send_sw(SW_OK); + } else { + io_send_sw(SW_DENY); + } + ui_menu_main(); +} + +static void content_cb(uint8_t contentIndex, nbgl_content_t *content) { + memset(content, 0, sizeof(nbgl_content_t)); + + switch (contentIndex) { + case 0: + content->type = CENTERED_INFO; + content->content.centeredInfo.text1 = "Centered Info"; + content->content.centeredInfo.text2 = "Text 2"; + content->content.centeredInfo.icon = &ICON_INFO; + break; + case 1: + // Format amount and address to g_amount and g_address buffers + memset(g_amount, 0, sizeof(g_amount)); + snprintf(g_amount, sizeof(g_amount), "NBT 0.99"); + memset(g_address, 0, sizeof(g_address)); + snprintf(g_address, sizeof(g_address), "0x1234567890"); + memset(g_address_long, 0, sizeof(g_address_long)); + snprintf(g_address_long, + sizeof(g_address_long), + "5A8FgbMkmG2e3J41sBdjvjaBUyz8qHohsQcGtRf63qEUTMBvmA45fpp5pSacMdSg7A3b71RejLzB8" + "EkGbfjp5PELVHCRUaE"); + // Setup data to display + pairs[0].item = "Amount"; + pairs[0].value = g_amount; + pairs[1].item = "Address Short"; + pairs[1].value = g_address; + pairs[2].item = "Address Long"; + pairs[2].value = g_address_long; + + content->type = TAG_VALUE_LIST; + content->content.tagValueList.nbPairs = 3; + content->content.tagValueList.pairs = pairs; + break; + case 2: + content->type = INFO_BUTTON; + content->content.infoButton.text = "Info Button"; + content->content.infoButton.icon = &ICON_APP; + content->content.infoButton.buttonText = "Valid"; + content->content.infoButton.buttonToken = FIRST_USER_TOKEN; + content->contentActionCallback = control_cb; + break; + default: + break; + } +} + +int ui_display_generic_review(void) { + static nbgl_genericContents_t genericContent = {0}; + + genericContent.callbackCallNeeded = true; + genericContent.contentGetterCallback = content_cb; + genericContent.nbContents = 3; + + // Start review flow + nbgl_useCaseGenericReview(&genericContent, "Cancel", quit_cb); + + return 0; +} + #endif diff --git a/src/ui/nbgl_display_transaction_legacy.c b/src/ui/nbgl_display_transaction_legacy.c index 7de94c6..aad315a 100644 --- a/src/ui/nbgl_display_transaction_legacy.c +++ b/src/ui/nbgl_display_transaction_legacy.c @@ -16,7 +16,6 @@ *****************************************************************************/ #ifdef HAVE_NBGL - #include // bool #include // memset @@ -30,14 +29,17 @@ #include "display.h" #include "menu.h" +// Following code is expected to be deprecated and removed. +// It is kept for compatibility with the previous version of the app. +// but not ported on Nano + // Buffer where the transaction amount string is written static char g_amount[30]; // Buffer where the transaction address string is written static char g_address[43]; -static nbgl_layoutTagValue_t pairs[3]; -static nbgl_layoutTagValueList_t pairList; -static nbgl_pageInfoLongPress_t infoLongPress; +static nbgl_contentTagValue_t pairs[3]; +static nbgl_contentTagValueList_t pairList; // called when long press button on 3rd page is long-touched or when reject footer is touched static void review_choice(bool confirm) { @@ -50,6 +52,9 @@ static void review_choice(bool confirm) { } } +#if defined(TARGET_STAX) || defined(TARGET_FLEX) +static nbgl_pageInfoLongPress_t infoLongPress; + static void reject_callback(void) { review_choice(false); } @@ -72,7 +77,7 @@ void continue_callback() { pairList.nbPairs = 2; pairList.pairs = pairs; - infoLongPress.icon = &LARGE_ICON; + infoLongPress.icon = &ICON_APP; infoLongPress.longPressText = "Hold to sign"; infoLongPress.longPressToken = 0; infoLongPress.tuneId = TUNE_TAP_CASUAL; @@ -83,7 +88,7 @@ void continue_callback() { // start a static review flow int ui_display_static_review() { - nbgl_useCaseReviewStart(&LARGE_ICON, + nbgl_useCaseReviewStart(&ICON_APP, "Review transaction\nto send NBT", NULL, "Reject", @@ -92,6 +97,12 @@ int ui_display_static_review() { return 0; } +#else // TARGET_STAX || TARGET_FLEX +int ui_display_static_review() { + io_send_sw(SW_INS_NOT_SUPPORTED); + return 0; +} +#endif // TARGET_STAX || TARGET_FLEX int ui_display_light_review() { // Format amount and address to g_amount and g_address buffers @@ -111,16 +122,10 @@ int ui_display_light_review() { pairList.nbPairs = 2; pairList.pairs = pairs; - infoLongPress.icon = &LARGE_ICON; - infoLongPress.longPressText = "Hold to sign"; - infoLongPress.longPressToken = 0; - infoLongPress.tuneId = TUNE_TAP_CASUAL; - infoLongPress.text = "Sign transaction\nto send NBT"; - // Start light review flow nbgl_useCaseReviewLight(TYPE_TRANSACTION, &pairList, - &LARGE_ICON, + &ICON_APP, "Review transaction\nto send NBT", NULL, "Sign transaction\nto send NBT", @@ -128,4 +133,4 @@ int ui_display_light_review() { return 0; } -#endif +#endif // HAVE_NBGL diff --git a/tests/application_client/nbgl_command_sender.py b/tests/application_client/nbgl_command_sender.py index 3502354..21a9c3d 100644 --- a/tests/application_client/nbgl_command_sender.py +++ b/tests/application_client/nbgl_command_sender.py @@ -15,6 +15,9 @@ class P1(IntEnum): P1_MAX = 0x03 # Parameter 1 for screen confirmation for GET_PUBLIC_KEY. P1_CONFIRM = 0x01 + # Parameter 1 for Keypad. + P1_DIGITS = 0x00 + P1_PIN = 0x01 class P2(IntEnum): # Parameter 2 for last APDU to receive. @@ -33,6 +36,12 @@ class InsType(IntEnum): TEST_SPINNER = 0x0A TEST_USE_CASE_STATIC_REVIEW = 0x0B TEST_USE_CASE_LIGHT_REVIEW = 0x0C + TEST_USE_CASE_CONFIRM = 0x0D + TEST_USE_CASE_GENERIC_CONFIG = 0x0E + TEST_USE_CASE_GENERIC_REVIEW = 0x0F + TEST_USE_CASE_GENERIC_SETTINGS = 0x10 + TEST_USE_CASE_KEYPAD = 0x11 + TEST_USE_CASE_NAVIGATION = 0x12 class Errors(IntEnum): SW_DENY = 0x6985 @@ -93,6 +102,44 @@ def test_spinner(self) -> Generator[None, None, None]: data=b"") as response: yield response + @contextmanager + def test_generic_settings(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_GENERIC_SETTINGS) as response: + yield response + + @contextmanager + def test_generic_config(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_GENERIC_CONFIG) as response: + yield response + + @contextmanager + def test_generic_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_GENERIC_REVIEW) as response: + yield response + + @contextmanager + def test_confirm(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_CONFIRM) as response: + yield response + + @contextmanager + def test_keypad(self, p1: int) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_KEYPAD, + p1=p1) as response: + yield response + + @contextmanager + def test_navigation(self, p1: int) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_NAVIGATION, + p1=p1) as response: + yield response + @contextmanager def test_use_case_review(self) -> Generator[None, None, None]: with self.backend.exchange_async(cla=CLA, diff --git a/tests/conftest.py b/tests/conftest.py index 909ec8b..d8c98fa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,10 +1,10 @@ -from ragger.conftest import configuration ########################### ### CONFIGURATION START ### ########################### -# You can configure optional parameters by overriding the value of ragger.configuration.OPTIONAL_CONFIGURATION +# You can configure optional parameters by overriding the value of +# ragger.configuration.OPTIONAL_CONFIGURATION # Please refer to ragger/conftest/configuration.py for their descriptions and accepted values ######################### diff --git a/tests/setup.cfg b/tests/setup.cfg index 7d0d7e3..2398a52 100644 --- a/tests/setup.cfg +++ b/tests/setup.cfg @@ -7,8 +7,10 @@ disable = C0114, # missing-module-docstring C0116, # missing-function-docstring C0103, # invalid-name R0801, # duplicate-code - R0913 # too-many-arguments -max-line-length=100 + R0913, # too-many-arguments + R0917 # too-many-positional-arguments + +max-line-length=120 extension-pkg-whitelist=hid [pycodestyle] diff --git a/tests/snapshots/flex/test_app_demo_flow_BS_stake/part1/00002.png b/tests/snapshots/flex/test_app_demo_flow_BS_stake/part1/00002.png index acbb161..039eff0 100644 Binary files a/tests/snapshots/flex/test_app_demo_flow_BS_stake/part1/00002.png and b/tests/snapshots/flex/test_app_demo_flow_BS_stake/part1/00002.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00006.png b/tests/snapshots/flex/test_app_mainmenu/00006.png index 3980c22..e0e18b0 100644 Binary files a/tests/snapshots/flex/test_app_mainmenu/00006.png and b/tests/snapshots/flex/test_app_mainmenu/00006.png differ diff --git a/tests/snapshots/flex/test_confirm/00000.png b/tests/snapshots/flex/test_confirm/00000.png new file mode 100644 index 0000000..d1d314b Binary files /dev/null and b/tests/snapshots/flex/test_confirm/00000.png differ diff --git a/tests/snapshots/flex/test_confirm/00001.png b/tests/snapshots/flex/test_confirm/00001.png new file mode 100644 index 0000000..6cb3f03 Binary files /dev/null and b/tests/snapshots/flex/test_confirm/00001.png differ diff --git a/tests/snapshots/flex/test_generic_config/00000.png b/tests/snapshots/flex/test_generic_config/00000.png new file mode 100644 index 0000000..ef479ec Binary files /dev/null and b/tests/snapshots/flex/test_generic_config/00000.png differ diff --git a/tests/snapshots/flex/test_generic_config/00001.png b/tests/snapshots/flex/test_generic_config/00001.png new file mode 100644 index 0000000..b2c33ca Binary files /dev/null and b/tests/snapshots/flex/test_generic_config/00001.png differ diff --git a/tests/snapshots/flex/test_generic_config/00002.png b/tests/snapshots/flex/test_generic_config/00002.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_generic_config/00002.png differ diff --git a/tests/snapshots/flex/test_generic_settings/00000.png b/tests/snapshots/flex/test_generic_settings/00000.png new file mode 100644 index 0000000..60e9c64 Binary files /dev/null and b/tests/snapshots/flex/test_generic_settings/00000.png differ diff --git a/tests/snapshots/flex/test_generic_settings/00001.png b/tests/snapshots/flex/test_generic_settings/00001.png new file mode 100644 index 0000000..a5cdb93 Binary files /dev/null and b/tests/snapshots/flex/test_generic_settings/00001.png differ diff --git a/tests/snapshots/flex/test_generic_settings/00002.png b/tests/snapshots/flex/test_generic_settings/00002.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_generic_settings/00002.png differ diff --git a/tests/snapshots/flex/test_keypad_digits/00000.png b/tests/snapshots/flex/test_keypad_digits/00000.png new file mode 100644 index 0000000..953ae0e Binary files /dev/null and b/tests/snapshots/flex/test_keypad_digits/00000.png differ diff --git a/tests/snapshots/flex/test_keypad_digits/00001.png b/tests/snapshots/flex/test_keypad_digits/00001.png new file mode 100644 index 0000000..c8422fa Binary files /dev/null and b/tests/snapshots/flex/test_keypad_digits/00001.png differ diff --git a/tests/snapshots/flex/test_keypad_digits/00002.png b/tests/snapshots/flex/test_keypad_digits/00002.png new file mode 100644 index 0000000..f690849 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_digits/00002.png differ diff --git a/tests/snapshots/flex/test_keypad_digits/00003.png b/tests/snapshots/flex/test_keypad_digits/00003.png new file mode 100644 index 0000000..f9ba634 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_digits/00003.png differ diff --git a/tests/snapshots/flex/test_keypad_digits/00004.png b/tests/snapshots/flex/test_keypad_digits/00004.png new file mode 100644 index 0000000..b9e9fa0 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_digits/00004.png differ diff --git a/tests/snapshots/flex/test_keypad_digits/00005.png b/tests/snapshots/flex/test_keypad_digits/00005.png new file mode 100644 index 0000000..0ee4513 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_digits/00005.png differ diff --git a/tests/snapshots/flex/test_keypad_pin/00000.png b/tests/snapshots/flex/test_keypad_pin/00000.png new file mode 100644 index 0000000..b37e555 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_pin/00000.png differ diff --git a/tests/snapshots/flex/test_keypad_pin/00001.png b/tests/snapshots/flex/test_keypad_pin/00001.png new file mode 100644 index 0000000..bcac8b4 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_pin/00001.png differ diff --git a/tests/snapshots/flex/test_keypad_pin/00002.png b/tests/snapshots/flex/test_keypad_pin/00002.png new file mode 100644 index 0000000..9cae270 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_pin/00002.png differ diff --git a/tests/snapshots/flex/test_keypad_pin/00003.png b/tests/snapshots/flex/test_keypad_pin/00003.png new file mode 100644 index 0000000..69bd12b Binary files /dev/null and b/tests/snapshots/flex/test_keypad_pin/00003.png differ diff --git a/tests/snapshots/flex/test_keypad_pin/00004.png b/tests/snapshots/flex/test_keypad_pin/00004.png new file mode 100644 index 0000000..5765562 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_pin/00004.png differ diff --git a/tests/snapshots/flex/test_keypad_pin/00005.png b/tests/snapshots/flex/test_keypad_pin/00005.png new file mode 100644 index 0000000..0ee4513 Binary files /dev/null and b/tests/snapshots/flex/test_keypad_pin/00005.png differ diff --git a/tests/snapshots/flex/test_navigation_bar/00000.png b/tests/snapshots/flex/test_navigation_bar/00000.png new file mode 100644 index 0000000..c63b5a8 Binary files /dev/null and b/tests/snapshots/flex/test_navigation_bar/00000.png differ diff --git a/tests/snapshots/flex/test_navigation_bar/00001.png b/tests/snapshots/flex/test_navigation_bar/00001.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_navigation_bar/00001.png differ diff --git a/tests/snapshots/flex/test_navigation_button/00000.png b/tests/snapshots/flex/test_navigation_button/00000.png new file mode 100644 index 0000000..21937f2 Binary files /dev/null and b/tests/snapshots/flex/test_navigation_button/00000.png differ diff --git a/tests/snapshots/flex/test_navigation_button/00001.png b/tests/snapshots/flex/test_navigation_button/00001.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_navigation_button/00001.png differ diff --git a/tests/snapshots/flex/test_navigation_choice/00000.png b/tests/snapshots/flex/test_navigation_choice/00000.png new file mode 100644 index 0000000..0c9879b Binary files /dev/null and b/tests/snapshots/flex/test_navigation_choice/00000.png differ diff --git a/tests/snapshots/flex/test_navigation_choice/00001.png b/tests/snapshots/flex/test_navigation_choice/00001.png new file mode 100644 index 0000000..5c52b99 Binary files /dev/null and b/tests/snapshots/flex/test_navigation_choice/00001.png differ diff --git a/tests/snapshots/flex/test_navigation_choice/00002.png b/tests/snapshots/flex/test_navigation_choice/00002.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_navigation_choice/00002.png differ diff --git a/tests/snapshots/flex/test_navigation_info/00000.png b/tests/snapshots/flex/test_navigation_info/00000.png new file mode 100644 index 0000000..6e5e304 Binary files /dev/null and b/tests/snapshots/flex/test_navigation_info/00000.png differ diff --git a/tests/snapshots/flex/test_navigation_info/00001.png b/tests/snapshots/flex/test_navigation_info/00001.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_navigation_info/00001.png differ diff --git a/tests/snapshots/flex/test_navigation_switch/00000.png b/tests/snapshots/flex/test_navigation_switch/00000.png new file mode 100644 index 0000000..52798dc Binary files /dev/null and b/tests/snapshots/flex/test_navigation_switch/00000.png differ diff --git a/tests/snapshots/flex/test_navigation_switch/00001.png b/tests/snapshots/flex/test_navigation_switch/00001.png new file mode 100644 index 0000000..d2cce97 Binary files /dev/null and b/tests/snapshots/flex/test_navigation_switch/00001.png differ diff --git a/tests/snapshots/flex/test_navigation_switch/00002.png b/tests/snapshots/flex/test_navigation_switch/00002.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_navigation_switch/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_address_review_refused/00000.png b/tests/snapshots/flex/test_use_case_address_review_refused/00000.png deleted file mode 100644 index 6c72a1c..0000000 Binary files a/tests/snapshots/flex/test_use_case_address_review_refused/00000.png and /dev/null differ diff --git a/tests/snapshots/flex/test_use_case_address_review_refused/00001.png b/tests/snapshots/flex/test_use_case_address_review_refused/00001.png deleted file mode 100644 index 03dea54..0000000 Binary files a/tests/snapshots/flex/test_use_case_address_review_refused/00001.png and /dev/null differ diff --git a/tests/snapshots/flex/test_use_case_address_review_refused/00002.png b/tests/snapshots/flex/test_use_case_address_review_refused/00002.png deleted file mode 100644 index 45c08d4..0000000 Binary files a/tests/snapshots/flex/test_use_case_address_review_refused/00002.png and /dev/null differ diff --git a/tests/snapshots/flex/test_use_case_address_review_refused/00003.png b/tests/snapshots/flex/test_use_case_address_review_refused/00003.png deleted file mode 100644 index fbd5fff..0000000 Binary files a/tests/snapshots/flex/test_use_case_address_review_refused/00003.png and /dev/null differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/BS_screen/00000.png b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/BS_screen/00000.png index acbb161..039eff0 100644 Binary files a/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/BS_screen/00000.png and b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00000.png b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00000.png index acbb161..039eff0 100644 Binary files a/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00000.png and b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00002.png b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00002.png index fb64696..bdf9190 100644 Binary files a/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00002.png and b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png index acbb161..039eff0 100644 Binary files a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_generic_review/00000.png b/tests/snapshots/flex/test_use_case_generic_review/00000.png new file mode 100644 index 0000000..0e134b3 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_generic_review/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_generic_review/00001.png b/tests/snapshots/flex/test_use_case_generic_review/00001.png new file mode 100644 index 0000000..edca4a7 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_generic_review/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_generic_review/00002.png b/tests/snapshots/flex/test_use_case_generic_review/00002.png new file mode 100644 index 0000000..9c01390 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_generic_review/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_generic_review/00003.png b/tests/snapshots/flex/test_use_case_generic_review/00003.png new file mode 100644 index 0000000..269eb47 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_generic_review/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_generic_review/00004.png b/tests/snapshots/flex/test_use_case_generic_review/00004.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_generic_review/00004.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00003.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00003.png new file mode 100644 index 0000000..83a87f3 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00004.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00004.png new file mode 100644 index 0000000..8352ac9 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part1/00004.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00000.png new file mode 100644 index 0000000..f1bdd34 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00001.png new file mode 100644 index 0000000..03fee3b Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00002.png new file mode 100644 index 0000000..e52cac3 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00003.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00003.png new file mode 100644 index 0000000..9d004f2 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00004.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00004.png new file mode 100644 index 0000000..84041e2 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00004.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00005.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00005.png new file mode 100644 index 0000000..bba003e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00005.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00006.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00006.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00006.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00007.png b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00007.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_BS_stake/part2/00007.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00003.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00003.png new file mode 100644 index 0000000..83a87f3 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00004.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00004.png new file mode 100644 index 0000000..8352ac9 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00004.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00005.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00005.png new file mode 100644 index 0000000..b9ed8ca Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part1/00005.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00000.png new file mode 100644 index 0000000..6553bcd Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00001.png new file mode 100644 index 0000000..66e9bdb Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00002.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00003.png b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00003.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_SOL_receive/part2/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part1/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00000.png new file mode 100644 index 0000000..ec39152 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00001.png new file mode 100644 index 0000000..84bc0e3 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00002.png new file mode 100644 index 0000000..cfc5bee Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00003.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00003.png new file mode 100644 index 0000000..5db1c18 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00004.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00004.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00004.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00005.png b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00005.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_send_BTC/part2/00005.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00003.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00003.png new file mode 100644 index 0000000..83a87f3 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part1/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00000.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00000.png new file mode 100644 index 0000000..b40ef26 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00001.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00001.png new file mode 100644 index 0000000..cfe5259 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00002.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00002.png new file mode 100644 index 0000000..1793447 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00003.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00003.png new file mode 100644 index 0000000..87eb845 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00004.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00004.png new file mode 100644 index 0000000..4a13370 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00004.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00005.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00005.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00005.png differ diff --git a/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00006.png b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00006.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_demo_flow_swap_1inch/part2/00006.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00000.png b/tests/snapshots/nanosp/test_app_mainmenu/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00000.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00001.png b/tests/snapshots/nanosp/test_app_mainmenu/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00001.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00002.png b/tests/snapshots/nanosp/test_app_mainmenu/00002.png new file mode 100644 index 0000000..96b8c0c Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00002.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00003.png b/tests/snapshots/nanosp/test_app_mainmenu/00003.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00003.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00004.png b/tests/snapshots/nanosp/test_app_mainmenu/00004.png new file mode 100644 index 0000000..022df4e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00004.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00005.png b/tests/snapshots/nanosp/test_app_mainmenu/00005.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00005.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00006.png b/tests/snapshots/nanosp/test_app_mainmenu/00006.png new file mode 100644 index 0000000..bc6a12e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00006.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00007.png b/tests/snapshots/nanosp/test_app_mainmenu/00007.png new file mode 100644 index 0000000..e55d6a1 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00007.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00008.png b/tests/snapshots/nanosp/test_app_mainmenu/00008.png new file mode 100644 index 0000000..1f9f279 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00008.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00009.png b/tests/snapshots/nanosp/test_app_mainmenu/00009.png new file mode 100644 index 0000000..05ad0db Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00009.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00010.png b/tests/snapshots/nanosp/test_app_mainmenu/00010.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00010.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00011.png b/tests/snapshots/nanosp/test_app_mainmenu/00011.png new file mode 100644 index 0000000..96b8c0c Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00011.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00012.png b/tests/snapshots/nanosp/test_app_mainmenu/00012.png new file mode 100644 index 0000000..9771489 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00012.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00013.png b/tests/snapshots/nanosp/test_app_mainmenu/00013.png new file mode 100644 index 0000000..1bff3ea Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00013.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00014.png b/tests/snapshots/nanosp/test_app_mainmenu/00014.png new file mode 100644 index 0000000..9a44bd9 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00014.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00015.png b/tests/snapshots/nanosp/test_app_mainmenu/00015.png new file mode 100644 index 0000000..8865c73 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00015.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00016.png b/tests/snapshots/nanosp/test_app_mainmenu/00016.png new file mode 100644 index 0000000..e2139bc Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00016.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00017.png b/tests/snapshots/nanosp/test_app_mainmenu/00017.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00017.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00018.png b/tests/snapshots/nanosp/test_app_mainmenu/00018.png new file mode 100644 index 0000000..9771489 Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00018.png differ diff --git a/tests/snapshots/nanosp/test_app_mainmenu/00019.png b/tests/snapshots/nanosp/test_app_mainmenu/00019.png new file mode 100644 index 0000000..5479b4e Binary files /dev/null and b/tests/snapshots/nanosp/test_app_mainmenu/00019.png differ diff --git a/tests/snapshots/nanosp/test_confirm/00000.png b/tests/snapshots/nanosp/test_confirm/00000.png new file mode 100644 index 0000000..985c770 Binary files /dev/null and b/tests/snapshots/nanosp/test_confirm/00000.png differ diff --git a/tests/snapshots/nanosp/test_confirm/00001.png b/tests/snapshots/nanosp/test_confirm/00001.png new file mode 100644 index 0000000..7dfa0c5 Binary files /dev/null and b/tests/snapshots/nanosp/test_confirm/00001.png differ diff --git a/tests/snapshots/nanosp/test_confirm/00002.png b/tests/snapshots/nanosp/test_confirm/00002.png new file mode 100644 index 0000000..be17444 Binary files /dev/null and b/tests/snapshots/nanosp/test_confirm/00002.png differ diff --git a/tests/snapshots/nanosp/test_generic_config/00000.png b/tests/snapshots/nanosp/test_generic_config/00000.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_config/00000.png differ diff --git a/tests/snapshots/nanosp/test_generic_config/00001.png b/tests/snapshots/nanosp/test_generic_config/00001.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_config/00001.png differ diff --git a/tests/snapshots/nanosp/test_generic_config/00002.png b/tests/snapshots/nanosp/test_generic_config/00002.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_config/00002.png differ diff --git a/tests/snapshots/nanosp/test_generic_config/00003.png b/tests/snapshots/nanosp/test_generic_config/00003.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_config/00003.png differ diff --git a/tests/snapshots/nanosp/test_generic_settings/00000.png b/tests/snapshots/nanosp/test_generic_settings/00000.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_settings/00000.png differ diff --git a/tests/snapshots/nanosp/test_generic_settings/00001.png b/tests/snapshots/nanosp/test_generic_settings/00001.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_settings/00001.png differ diff --git a/tests/snapshots/nanosp/test_generic_settings/00002.png b/tests/snapshots/nanosp/test_generic_settings/00002.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_settings/00002.png differ diff --git a/tests/snapshots/nanosp/test_generic_settings/00003.png b/tests/snapshots/nanosp/test_generic_settings/00003.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_generic_settings/00003.png differ diff --git a/tests/snapshots/nanosp/test_navigation_bar/00000.png b/tests/snapshots/nanosp/test_navigation_bar/00000.png new file mode 100644 index 0000000..8b42d24 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_bar/00000.png differ diff --git a/tests/snapshots/nanosp/test_navigation_bar/00001.png b/tests/snapshots/nanosp/test_navigation_bar/00001.png new file mode 100644 index 0000000..3d30218 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_bar/00001.png differ diff --git a/tests/snapshots/nanosp/test_navigation_bar/00002.png b/tests/snapshots/nanosp/test_navigation_bar/00002.png new file mode 100644 index 0000000..c9f507c Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_bar/00002.png differ diff --git a/tests/snapshots/nanosp/test_navigation_bar/00003.png b/tests/snapshots/nanosp/test_navigation_bar/00003.png new file mode 100644 index 0000000..298f81b Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_bar/00003.png differ diff --git a/tests/snapshots/nanosp/test_navigation_bar/00004.png b/tests/snapshots/nanosp/test_navigation_bar/00004.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_bar/00004.png differ diff --git a/tests/snapshots/nanosp/test_navigation_bar/00005.png b/tests/snapshots/nanosp/test_navigation_bar/00005.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_bar/00005.png differ diff --git a/tests/snapshots/nanosp/test_navigation_button/00000.png b/tests/snapshots/nanosp/test_navigation_button/00000.png new file mode 100644 index 0000000..3e44586 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_button/00000.png differ diff --git a/tests/snapshots/nanosp/test_navigation_button/00001.png b/tests/snapshots/nanosp/test_navigation_button/00001.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_button/00001.png differ diff --git a/tests/snapshots/nanosp/test_navigation_button/00002.png b/tests/snapshots/nanosp/test_navigation_button/00002.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_button/00002.png differ diff --git a/tests/snapshots/nanosp/test_navigation_choice/00000.png b/tests/snapshots/nanosp/test_navigation_choice/00000.png new file mode 100644 index 0000000..b511807 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_choice/00000.png differ diff --git a/tests/snapshots/nanosp/test_navigation_choice/00001.png b/tests/snapshots/nanosp/test_navigation_choice/00001.png new file mode 100644 index 0000000..59d2f19 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_choice/00001.png differ diff --git a/tests/snapshots/nanosp/test_navigation_choice/00002.png b/tests/snapshots/nanosp/test_navigation_choice/00002.png new file mode 100644 index 0000000..08034ad Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_choice/00002.png differ diff --git a/tests/snapshots/nanosp/test_navigation_choice/00003.png b/tests/snapshots/nanosp/test_navigation_choice/00003.png new file mode 100644 index 0000000..a20c4cc Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_choice/00003.png differ diff --git a/tests/snapshots/nanosp/test_navigation_choice/00004.png b/tests/snapshots/nanosp/test_navigation_choice/00004.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_choice/00004.png differ diff --git a/tests/snapshots/nanosp/test_navigation_choice/00005.png b/tests/snapshots/nanosp/test_navigation_choice/00005.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_choice/00005.png differ diff --git a/tests/snapshots/nanosp/test_navigation_info/00000.png b/tests/snapshots/nanosp/test_navigation_info/00000.png new file mode 100644 index 0000000..e351431 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_info/00000.png differ diff --git a/tests/snapshots/nanosp/test_navigation_info/00001.png b/tests/snapshots/nanosp/test_navigation_info/00001.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_info/00001.png differ diff --git a/tests/snapshots/nanosp/test_navigation_info/00002.png b/tests/snapshots/nanosp/test_navigation_info/00002.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_info/00002.png differ diff --git a/tests/snapshots/nanosp/test_navigation_switch/00000.png b/tests/snapshots/nanosp/test_navigation_switch/00000.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_switch/00000.png differ diff --git a/tests/snapshots/nanosp/test_navigation_switch/00001.png b/tests/snapshots/nanosp/test_navigation_switch/00001.png new file mode 100644 index 0000000..022df4e Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_switch/00001.png differ diff --git a/tests/snapshots/nanosp/test_navigation_switch/00002.png b/tests/snapshots/nanosp/test_navigation_switch/00002.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_switch/00002.png differ diff --git a/tests/snapshots/nanosp/test_navigation_switch/00003.png b/tests/snapshots/nanosp/test_navigation_switch/00003.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_switch/00003.png differ diff --git a/tests/snapshots/nanosp/test_navigation_switch/00004.png b/tests/snapshots/nanosp/test_navigation_switch/00004.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_navigation_switch/00004.png differ diff --git a/tests/snapshots/nanosp/test_spinner/00000.png b/tests/snapshots/nanosp/test_spinner/00000.png new file mode 100644 index 0000000..72c2485 Binary files /dev/null and b/tests/snapshots/nanosp/test_spinner/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_address_review_accepted/00000.png b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00000.png new file mode 100644 index 0000000..caf0a65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_address_review_accepted/00001.png b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00001.png new file mode 100644 index 0000000..40f4228 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_address_review_accepted/00002.png b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00002.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_address_review_accepted/00003.png b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00003.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_address_review_accepted/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00000.png b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00000.png new file mode 100644 index 0000000..41b25af Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00001.png b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00002.png b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00003.png b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00004.png b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00004.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/BS_screen/00000.png b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/BS_screen/00000.png new file mode 100644 index 0000000..f1bdd34 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00000.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00000.png new file mode 100644 index 0000000..41b25af Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00001.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00001.png new file mode 100644 index 0000000..70a5767 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00002.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00003.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00003.png new file mode 100644 index 0000000..0bf96bd Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00004.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00004.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00005.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00005.png new file mode 100644 index 0000000..1b72ecc Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00006.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00006.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00006.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00007.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00007.png new file mode 100644 index 0000000..85dbf6f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00007.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00008.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00008.png new file mode 100644 index 0000000..ede0f65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00008.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00009.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00009.png new file mode 100644 index 0000000..560bd65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00009.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00010.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00010.png new file mode 100644 index 0000000..b2cfb6a Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00010.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00011.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00011.png new file mode 100644 index 0000000..0602988 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00011.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00012.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00012.png new file mode 100644 index 0000000..3e08793 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00012.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00013.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00013.png new file mode 100644 index 0000000..9af2215 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00013.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00014.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00014.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/00014.png differ diff --git a/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png new file mode 100644 index 0000000..f1bdd34 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_generic_review/00000.png b/tests/snapshots/nanosp/test_use_case_generic_review/00000.png new file mode 100644 index 0000000..6e6948f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_generic_review/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_generic_review/00001.png b/tests/snapshots/nanosp/test_use_case_generic_review/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_generic_review/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_generic_review/00002.png b/tests/snapshots/nanosp/test_use_case_generic_review/00002.png new file mode 100644 index 0000000..8af119a Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_generic_review/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_generic_review/00003.png b/tests/snapshots/nanosp/test_use_case_generic_review/00003.png new file mode 100644 index 0000000..a6d06a5 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_generic_review/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_generic_review/00004.png b/tests/snapshots/nanosp/test_use_case_generic_review/00004.png new file mode 100644 index 0000000..26fafbf Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_generic_review/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_generic_review/00005.png b/tests/snapshots/nanosp/test_use_case_generic_review/00005.png new file mode 100644 index 0000000..f8e14f4 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_generic_review/00005.png differ diff --git a/tests/snapshots/nanosp/test_use_case_generic_review/00006.png b/tests/snapshots/nanosp/test_use_case_generic_review/00006.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_generic_review/00006.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_accepted/00000.png b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_accepted/00001.png b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_accepted/00002.png b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_accepted/00003.png b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_accepted/00004.png b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00004.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_accepted/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_refused/00000.png b/tests/snapshots/nanosp/test_use_case_light_review_refused/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_refused/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_refused/00001.png b/tests/snapshots/nanosp/test_use_case_light_review_refused/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_refused/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_refused/00002.png b/tests/snapshots/nanosp/test_use_case_light_review_refused/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_refused/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_refused/00003.png b/tests/snapshots/nanosp/test_use_case_light_review_refused/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_refused/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_refused/00004.png b/tests/snapshots/nanosp/test_use_case_light_review_refused/00004.png new file mode 100644 index 0000000..5a0ada6 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_refused/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_light_review_refused/00005.png b/tests/snapshots/nanosp/test_use_case_light_review_refused/00005.png new file mode 100644 index 0000000..d185b8d Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_light_review_refused/00005.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00000.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00000.png new file mode 100644 index 0000000..caf0a65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00001.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00001.png new file mode 100644 index 0000000..205fc13 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00002.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00002.png new file mode 100644 index 0000000..a831a73 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00003.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00004.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00004.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00000.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00000.png new file mode 100644 index 0000000..caf0a65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00001.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00001.png new file mode 100644 index 0000000..205fc13 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00002.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00002.png new file mode 100644 index 0000000..a831a73 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00003.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00003.png new file mode 100644 index 0000000..8a7233d Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00004.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00004.png new file mode 100644 index 0000000..46db917 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00005.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00005.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00005.png differ diff --git a/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00006.png b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00006.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_long_address_review_accepted_with_tags/00006.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_accepted/00000.png b/tests/snapshots/nanosp/test_use_case_review_accepted/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_accepted/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_accepted/00001.png b/tests/snapshots/nanosp/test_use_case_review_accepted/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_accepted/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_accepted/00002.png b/tests/snapshots/nanosp/test_use_case_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_accepted/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_accepted/00003.png b/tests/snapshots/nanosp/test_use_case_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_accepted/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_accepted/00004.png b/tests/snapshots/nanosp/test_use_case_review_accepted/00004.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_accepted/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_refused/00000.png b/tests/snapshots/nanosp/test_use_case_review_refused/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_refused/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_refused/00001.png b/tests/snapshots/nanosp/test_use_case_review_refused/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_refused/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_refused/00002.png b/tests/snapshots/nanosp/test_use_case_review_refused/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_refused/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_refused/00003.png b/tests/snapshots/nanosp/test_use_case_review_refused/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_refused/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_refused/00004.png b/tests/snapshots/nanosp/test_use_case_review_refused/00004.png new file mode 100644 index 0000000..5a0ada6 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_refused/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_review_refused/00005.png b/tests/snapshots/nanosp/test_use_case_review_refused/00005.png new file mode 100644 index 0000000..d185b8d Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_review_refused/00005.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00000.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00001.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00001.png new file mode 100644 index 0000000..70a5767 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00002.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00003.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00003.png new file mode 100644 index 0000000..0bf96bd Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00004.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00004.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00005.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00005.png new file mode 100644 index 0000000..1b72ecc Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00006.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00006.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00006.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00007.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00007.png new file mode 100644 index 0000000..85dbf6f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00007.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00008.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00008.png new file mode 100644 index 0000000..ede0f65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00008.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00009.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00009.png new file mode 100644 index 0000000..560bd65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00009.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00010.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00010.png new file mode 100644 index 0000000..b2cfb6a Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00010.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00011.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00011.png new file mode 100644 index 0000000..0602988 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00011.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00012.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00012.png new file mode 100644 index 0000000..3e08793 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00012.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00013.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00013.png new file mode 100644 index 0000000..9af2215 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00013.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00014.png b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00014.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_accepted/00014.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00000.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00000.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00001.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00001.png new file mode 100644 index 0000000..70a5767 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00001.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00002.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00002.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00003.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00003.png new file mode 100644 index 0000000..0bf96bd Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00003.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00004.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00004.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00004.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00005.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00005.png new file mode 100644 index 0000000..1b72ecc Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00005.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00006.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00006.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00006.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00007.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00007.png new file mode 100644 index 0000000..85dbf6f Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00007.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00008.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00008.png new file mode 100644 index 0000000..ede0f65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00008.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00009.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00009.png new file mode 100644 index 0000000..560bd65 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00009.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00010.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00010.png new file mode 100644 index 0000000..b2cfb6a Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00010.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00011.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00011.png new file mode 100644 index 0000000..0602988 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00011.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00012.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00012.png new file mode 100644 index 0000000..3e08793 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00012.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00013.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00013.png new file mode 100644 index 0000000..9af2215 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00013.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00014.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00014.png new file mode 100644 index 0000000..5a0ada6 Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00014.png differ diff --git a/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00015.png b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00015.png new file mode 100644 index 0000000..d185b8d Binary files /dev/null and b/tests/snapshots/nanosp/test_use_case_streaming_review_refused/00015.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00000.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00001.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00002.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00003.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00003.png new file mode 100644 index 0000000..83a87f3 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00003.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00004.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00004.png new file mode 100644 index 0000000..8352ac9 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part1/00004.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00000.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00000.png new file mode 100644 index 0000000..f1bdd34 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00001.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00001.png new file mode 100644 index 0000000..03fee3b Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00002.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00002.png new file mode 100644 index 0000000..e52cac3 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00003.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00003.png new file mode 100644 index 0000000..9d004f2 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00003.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00004.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00004.png new file mode 100644 index 0000000..84041e2 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00004.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00005.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00005.png new file mode 100644 index 0000000..bba003e Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00005.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00006.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00006.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00006.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00007.png b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00007.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_BS_stake/part2/00007.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00000.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00001.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00002.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00003.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00003.png new file mode 100644 index 0000000..83a87f3 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00003.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00004.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00004.png new file mode 100644 index 0000000..8352ac9 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00004.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00005.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00005.png new file mode 100644 index 0000000..b9ed8ca Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part1/00005.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00000.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00000.png new file mode 100644 index 0000000..6553bcd Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00001.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00001.png new file mode 100644 index 0000000..66e9bdb Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00002.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00002.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00003.png b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00003.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_SOL_receive/part2/00003.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00000.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00001.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00002.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part1/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00000.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00000.png new file mode 100644 index 0000000..ec39152 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00001.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00001.png new file mode 100644 index 0000000..84bc0e3 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00002.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00002.png new file mode 100644 index 0000000..cfc5bee Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00003.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00003.png new file mode 100644 index 0000000..5db1c18 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00003.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00004.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00004.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00004.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00005.png b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00005.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_send_BTC/part2/00005.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00000.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00001.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00002.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00002.png new file mode 100644 index 0000000..79e070f Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00003.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00003.png new file mode 100644 index 0000000..83a87f3 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part1/00003.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00000.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00000.png new file mode 100644 index 0000000..b40ef26 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00000.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00001.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00001.png new file mode 100644 index 0000000..cfe5259 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00001.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00002.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00002.png new file mode 100644 index 0000000..1793447 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00002.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00003.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00003.png new file mode 100644 index 0000000..87eb845 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00003.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00004.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00004.png new file mode 100644 index 0000000..4a13370 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00004.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00005.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00005.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00005.png differ diff --git a/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00006.png b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00006.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_app_demo_flow_swap_1inch/part2/00006.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00000.png b/tests/snapshots/nanox/test_app_mainmenu/00000.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00000.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00001.png b/tests/snapshots/nanox/test_app_mainmenu/00001.png new file mode 100644 index 0000000..cf84ea5 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00001.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00002.png b/tests/snapshots/nanox/test_app_mainmenu/00002.png new file mode 100644 index 0000000..96b8c0c Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00002.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00003.png b/tests/snapshots/nanox/test_app_mainmenu/00003.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00003.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00004.png b/tests/snapshots/nanox/test_app_mainmenu/00004.png new file mode 100644 index 0000000..022df4e Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00004.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00005.png b/tests/snapshots/nanox/test_app_mainmenu/00005.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00005.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00006.png b/tests/snapshots/nanox/test_app_mainmenu/00006.png new file mode 100644 index 0000000..bc6a12e Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00006.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00007.png b/tests/snapshots/nanox/test_app_mainmenu/00007.png new file mode 100644 index 0000000..e55d6a1 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00007.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00008.png b/tests/snapshots/nanox/test_app_mainmenu/00008.png new file mode 100644 index 0000000..1f9f279 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00008.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00009.png b/tests/snapshots/nanox/test_app_mainmenu/00009.png new file mode 100644 index 0000000..05ad0db Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00009.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00010.png b/tests/snapshots/nanox/test_app_mainmenu/00010.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00010.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00011.png b/tests/snapshots/nanox/test_app_mainmenu/00011.png new file mode 100644 index 0000000..96b8c0c Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00011.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00012.png b/tests/snapshots/nanox/test_app_mainmenu/00012.png new file mode 100644 index 0000000..9771489 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00012.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00013.png b/tests/snapshots/nanox/test_app_mainmenu/00013.png new file mode 100644 index 0000000..1bff3ea Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00013.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00014.png b/tests/snapshots/nanox/test_app_mainmenu/00014.png new file mode 100644 index 0000000..9a44bd9 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00014.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00015.png b/tests/snapshots/nanox/test_app_mainmenu/00015.png new file mode 100644 index 0000000..8865c73 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00015.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00016.png b/tests/snapshots/nanox/test_app_mainmenu/00016.png new file mode 100644 index 0000000..e2139bc Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00016.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00017.png b/tests/snapshots/nanox/test_app_mainmenu/00017.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00017.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00018.png b/tests/snapshots/nanox/test_app_mainmenu/00018.png new file mode 100644 index 0000000..9771489 Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00018.png differ diff --git a/tests/snapshots/nanox/test_app_mainmenu/00019.png b/tests/snapshots/nanox/test_app_mainmenu/00019.png new file mode 100644 index 0000000..5479b4e Binary files /dev/null and b/tests/snapshots/nanox/test_app_mainmenu/00019.png differ diff --git a/tests/snapshots/nanox/test_confirm/00000.png b/tests/snapshots/nanox/test_confirm/00000.png new file mode 100644 index 0000000..985c770 Binary files /dev/null and b/tests/snapshots/nanox/test_confirm/00000.png differ diff --git a/tests/snapshots/nanox/test_confirm/00001.png b/tests/snapshots/nanox/test_confirm/00001.png new file mode 100644 index 0000000..7dfa0c5 Binary files /dev/null and b/tests/snapshots/nanox/test_confirm/00001.png differ diff --git a/tests/snapshots/nanox/test_confirm/00002.png b/tests/snapshots/nanox/test_confirm/00002.png new file mode 100644 index 0000000..be17444 Binary files /dev/null and b/tests/snapshots/nanox/test_confirm/00002.png differ diff --git a/tests/snapshots/nanox/test_generic_config/00000.png b/tests/snapshots/nanox/test_generic_config/00000.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanox/test_generic_config/00000.png differ diff --git a/tests/snapshots/nanox/test_generic_config/00001.png b/tests/snapshots/nanox/test_generic_config/00001.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanox/test_generic_config/00001.png differ diff --git a/tests/snapshots/nanox/test_generic_config/00002.png b/tests/snapshots/nanox/test_generic_config/00002.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_generic_config/00002.png differ diff --git a/tests/snapshots/nanox/test_generic_config/00003.png b/tests/snapshots/nanox/test_generic_config/00003.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_generic_config/00003.png differ diff --git a/tests/snapshots/nanox/test_generic_settings/00000.png b/tests/snapshots/nanox/test_generic_settings/00000.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanox/test_generic_settings/00000.png differ diff --git a/tests/snapshots/nanox/test_generic_settings/00001.png b/tests/snapshots/nanox/test_generic_settings/00001.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanox/test_generic_settings/00001.png differ diff --git a/tests/snapshots/nanox/test_generic_settings/00002.png b/tests/snapshots/nanox/test_generic_settings/00002.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_generic_settings/00002.png differ diff --git a/tests/snapshots/nanox/test_generic_settings/00003.png b/tests/snapshots/nanox/test_generic_settings/00003.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_generic_settings/00003.png differ diff --git a/tests/snapshots/nanox/test_navigation_bar/00000.png b/tests/snapshots/nanox/test_navigation_bar/00000.png new file mode 100644 index 0000000..8b42d24 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_bar/00000.png differ diff --git a/tests/snapshots/nanox/test_navigation_bar/00001.png b/tests/snapshots/nanox/test_navigation_bar/00001.png new file mode 100644 index 0000000..3d30218 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_bar/00001.png differ diff --git a/tests/snapshots/nanox/test_navigation_bar/00002.png b/tests/snapshots/nanox/test_navigation_bar/00002.png new file mode 100644 index 0000000..c9f507c Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_bar/00002.png differ diff --git a/tests/snapshots/nanox/test_navigation_bar/00003.png b/tests/snapshots/nanox/test_navigation_bar/00003.png new file mode 100644 index 0000000..298f81b Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_bar/00003.png differ diff --git a/tests/snapshots/nanox/test_navigation_bar/00004.png b/tests/snapshots/nanox/test_navigation_bar/00004.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_bar/00004.png differ diff --git a/tests/snapshots/nanox/test_navigation_bar/00005.png b/tests/snapshots/nanox/test_navigation_bar/00005.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_bar/00005.png differ diff --git a/tests/snapshots/nanox/test_navigation_button/00000.png b/tests/snapshots/nanox/test_navigation_button/00000.png new file mode 100644 index 0000000..3e44586 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_button/00000.png differ diff --git a/tests/snapshots/nanox/test_navigation_button/00001.png b/tests/snapshots/nanox/test_navigation_button/00001.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_button/00001.png differ diff --git a/tests/snapshots/nanox/test_navigation_button/00002.png b/tests/snapshots/nanox/test_navigation_button/00002.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_button/00002.png differ diff --git a/tests/snapshots/nanox/test_navigation_choice/00000.png b/tests/snapshots/nanox/test_navigation_choice/00000.png new file mode 100644 index 0000000..b511807 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_choice/00000.png differ diff --git a/tests/snapshots/nanox/test_navigation_choice/00001.png b/tests/snapshots/nanox/test_navigation_choice/00001.png new file mode 100644 index 0000000..59d2f19 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_choice/00001.png differ diff --git a/tests/snapshots/nanox/test_navigation_choice/00002.png b/tests/snapshots/nanox/test_navigation_choice/00002.png new file mode 100644 index 0000000..08034ad Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_choice/00002.png differ diff --git a/tests/snapshots/nanox/test_navigation_choice/00003.png b/tests/snapshots/nanox/test_navigation_choice/00003.png new file mode 100644 index 0000000..a20c4cc Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_choice/00003.png differ diff --git a/tests/snapshots/nanox/test_navigation_choice/00004.png b/tests/snapshots/nanox/test_navigation_choice/00004.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_choice/00004.png differ diff --git a/tests/snapshots/nanox/test_navigation_choice/00005.png b/tests/snapshots/nanox/test_navigation_choice/00005.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_choice/00005.png differ diff --git a/tests/snapshots/nanox/test_navigation_info/00000.png b/tests/snapshots/nanox/test_navigation_info/00000.png new file mode 100644 index 0000000..e351431 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_info/00000.png differ diff --git a/tests/snapshots/nanox/test_navigation_info/00001.png b/tests/snapshots/nanox/test_navigation_info/00001.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_info/00001.png differ diff --git a/tests/snapshots/nanox/test_navigation_info/00002.png b/tests/snapshots/nanox/test_navigation_info/00002.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_info/00002.png differ diff --git a/tests/snapshots/nanox/test_navigation_switch/00000.png b/tests/snapshots/nanox/test_navigation_switch/00000.png new file mode 100644 index 0000000..0e4de82 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_switch/00000.png differ diff --git a/tests/snapshots/nanox/test_navigation_switch/00001.png b/tests/snapshots/nanox/test_navigation_switch/00001.png new file mode 100644 index 0000000..022df4e Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_switch/00001.png differ diff --git a/tests/snapshots/nanox/test_navigation_switch/00002.png b/tests/snapshots/nanox/test_navigation_switch/00002.png new file mode 100644 index 0000000..9902e72 Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_switch/00002.png differ diff --git a/tests/snapshots/nanox/test_navigation_switch/00003.png b/tests/snapshots/nanox/test_navigation_switch/00003.png new file mode 100644 index 0000000..7528a4b Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_switch/00003.png differ diff --git a/tests/snapshots/nanox/test_navigation_switch/00004.png b/tests/snapshots/nanox/test_navigation_switch/00004.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_navigation_switch/00004.png differ diff --git a/tests/snapshots/nanox/test_spinner/00000.png b/tests/snapshots/nanox/test_spinner/00000.png new file mode 100644 index 0000000..72c2485 Binary files /dev/null and b/tests/snapshots/nanox/test_spinner/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_address_review_accepted/00000.png b/tests/snapshots/nanox/test_use_case_address_review_accepted/00000.png new file mode 100644 index 0000000..caf0a65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_address_review_accepted/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_address_review_accepted/00001.png b/tests/snapshots/nanox/test_use_case_address_review_accepted/00001.png new file mode 100644 index 0000000..40f4228 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_address_review_accepted/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_address_review_accepted/00002.png b/tests/snapshots/nanox/test_use_case_address_review_accepted/00002.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_address_review_accepted/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_address_review_accepted/00003.png b/tests/snapshots/nanox/test_use_case_address_review_accepted/00003.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_address_review_accepted/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00000.png b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00000.png new file mode 100644 index 0000000..41b25af Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00001.png b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00002.png b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00003.png b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00004.png b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00004.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/BS_screen/00000.png b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/BS_screen/00000.png new file mode 100644 index 0000000..f1bdd34 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00000.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00000.png new file mode 100644 index 0000000..41b25af Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00001.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00001.png new file mode 100644 index 0000000..70a5767 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00002.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00003.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00003.png new file mode 100644 index 0000000..0bf96bd Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00004.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00004.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00005.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00005.png new file mode 100644 index 0000000..1b72ecc Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00006.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00006.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00006.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00007.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00007.png new file mode 100644 index 0000000..85dbf6f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00007.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00008.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00008.png new file mode 100644 index 0000000..ede0f65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00008.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00009.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00009.png new file mode 100644 index 0000000..560bd65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00009.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00010.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00010.png new file mode 100644 index 0000000..b2cfb6a Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00010.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00011.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00011.png new file mode 100644 index 0000000..0602988 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00011.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00012.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00012.png new file mode 100644 index 0000000..3e08793 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00012.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00013.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00013.png new file mode 100644 index 0000000..9af2215 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00013.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00014.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00014.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/00014.png differ diff --git a/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png new file mode 100644 index 0000000..f1bdd34 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_generic_review/00000.png b/tests/snapshots/nanox/test_use_case_generic_review/00000.png new file mode 100644 index 0000000..6e6948f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_generic_review/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_generic_review/00001.png b/tests/snapshots/nanox/test_use_case_generic_review/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_generic_review/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_generic_review/00002.png b/tests/snapshots/nanox/test_use_case_generic_review/00002.png new file mode 100644 index 0000000..8af119a Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_generic_review/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_generic_review/00003.png b/tests/snapshots/nanox/test_use_case_generic_review/00003.png new file mode 100644 index 0000000..a6d06a5 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_generic_review/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_generic_review/00004.png b/tests/snapshots/nanox/test_use_case_generic_review/00004.png new file mode 100644 index 0000000..26fafbf Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_generic_review/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_generic_review/00005.png b/tests/snapshots/nanox/test_use_case_generic_review/00005.png new file mode 100644 index 0000000..f8e14f4 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_generic_review/00005.png differ diff --git a/tests/snapshots/nanox/test_use_case_generic_review/00006.png b/tests/snapshots/nanox/test_use_case_generic_review/00006.png new file mode 100644 index 0000000..0bee9be Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_generic_review/00006.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_accepted/00000.png b/tests/snapshots/nanox/test_use_case_light_review_accepted/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_accepted/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_accepted/00001.png b/tests/snapshots/nanox/test_use_case_light_review_accepted/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_accepted/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_accepted/00002.png b/tests/snapshots/nanox/test_use_case_light_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_accepted/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_accepted/00003.png b/tests/snapshots/nanox/test_use_case_light_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_accepted/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_accepted/00004.png b/tests/snapshots/nanox/test_use_case_light_review_accepted/00004.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_accepted/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_refused/00000.png b/tests/snapshots/nanox/test_use_case_light_review_refused/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_refused/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_refused/00001.png b/tests/snapshots/nanox/test_use_case_light_review_refused/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_refused/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_refused/00002.png b/tests/snapshots/nanox/test_use_case_light_review_refused/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_refused/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_refused/00003.png b/tests/snapshots/nanox/test_use_case_light_review_refused/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_refused/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_refused/00004.png b/tests/snapshots/nanox/test_use_case_light_review_refused/00004.png new file mode 100644 index 0000000..5a0ada6 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_refused/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_light_review_refused/00005.png b/tests/snapshots/nanox/test_use_case_light_review_refused/00005.png new file mode 100644 index 0000000..d185b8d Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_light_review_refused/00005.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00000.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00000.png new file mode 100644 index 0000000..caf0a65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00001.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00001.png new file mode 100644 index 0000000..205fc13 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00002.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00002.png new file mode 100644 index 0000000..a831a73 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00003.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00004.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00004.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00000.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00000.png new file mode 100644 index 0000000..caf0a65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00001.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00001.png new file mode 100644 index 0000000..205fc13 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00002.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00002.png new file mode 100644 index 0000000..a831a73 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00003.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00003.png new file mode 100644 index 0000000..8a7233d Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00004.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00004.png new file mode 100644 index 0000000..46db917 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00005.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00005.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00005.png differ diff --git a/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00006.png b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00006.png new file mode 100644 index 0000000..169ef46 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_long_address_review_accepted_with_tags/00006.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_accepted/00000.png b/tests/snapshots/nanox/test_use_case_review_accepted/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_accepted/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_accepted/00001.png b/tests/snapshots/nanox/test_use_case_review_accepted/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_accepted/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_accepted/00002.png b/tests/snapshots/nanox/test_use_case_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_accepted/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_accepted/00003.png b/tests/snapshots/nanox/test_use_case_review_accepted/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_accepted/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_accepted/00004.png b/tests/snapshots/nanox/test_use_case_review_accepted/00004.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_accepted/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_refused/00000.png b/tests/snapshots/nanox/test_use_case_review_refused/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_refused/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_refused/00001.png b/tests/snapshots/nanox/test_use_case_review_refused/00001.png new file mode 100644 index 0000000..8b746d7 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_refused/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_refused/00002.png b/tests/snapshots/nanox/test_use_case_review_refused/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_refused/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_refused/00003.png b/tests/snapshots/nanox/test_use_case_review_refused/00003.png new file mode 100644 index 0000000..e3aac3e Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_refused/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_refused/00004.png b/tests/snapshots/nanox/test_use_case_review_refused/00004.png new file mode 100644 index 0000000..5a0ada6 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_refused/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_review_refused/00005.png b/tests/snapshots/nanox/test_use_case_review_refused/00005.png new file mode 100644 index 0000000..d185b8d Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_review_refused/00005.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00000.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00001.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00001.png new file mode 100644 index 0000000..70a5767 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00002.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00003.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00003.png new file mode 100644 index 0000000..0bf96bd Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00004.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00004.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00005.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00005.png new file mode 100644 index 0000000..1b72ecc Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00006.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00006.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00006.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00007.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00007.png new file mode 100644 index 0000000..85dbf6f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00007.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00008.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00008.png new file mode 100644 index 0000000..ede0f65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00008.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00009.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00009.png new file mode 100644 index 0000000..560bd65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00009.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00010.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00010.png new file mode 100644 index 0000000..b2cfb6a Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00010.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00011.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00011.png new file mode 100644 index 0000000..0602988 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00011.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00012.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00012.png new file mode 100644 index 0000000..3e08793 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00012.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00013.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00013.png new file mode 100644 index 0000000..9af2215 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00013.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00014.png b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00014.png new file mode 100644 index 0000000..eea3716 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_accepted/00014.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00000.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00000.png new file mode 100644 index 0000000..a9a92d0 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00000.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00001.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00001.png new file mode 100644 index 0000000..70a5767 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00001.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00002.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00002.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00002.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00003.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00003.png new file mode 100644 index 0000000..0bf96bd Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00003.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00004.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00004.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00004.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00005.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00005.png new file mode 100644 index 0000000..1b72ecc Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00005.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00006.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00006.png new file mode 100644 index 0000000..7bed95f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00006.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00007.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00007.png new file mode 100644 index 0000000..85dbf6f Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00007.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00008.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00008.png new file mode 100644 index 0000000..ede0f65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00008.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00009.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00009.png new file mode 100644 index 0000000..560bd65 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00009.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00010.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00010.png new file mode 100644 index 0000000..b2cfb6a Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00010.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00011.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00011.png new file mode 100644 index 0000000..0602988 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00011.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00012.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00012.png new file mode 100644 index 0000000..3e08793 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00012.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00013.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00013.png new file mode 100644 index 0000000..9af2215 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00013.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00014.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00014.png new file mode 100644 index 0000000..5a0ada6 Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00014.png differ diff --git a/tests/snapshots/nanox/test_use_case_streaming_review_refused/00015.png b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00015.png new file mode 100644 index 0000000..d185b8d Binary files /dev/null and b/tests/snapshots/nanox/test_use_case_streaming_review_refused/00015.png differ diff --git a/tests/snapshots/stax/test_app_demo_flow_BS_stake/part1/00002.png b/tests/snapshots/stax/test_app_demo_flow_BS_stake/part1/00002.png index 9696ae1..0463721 100644 Binary files a/tests/snapshots/stax/test_app_demo_flow_BS_stake/part1/00002.png and b/tests/snapshots/stax/test_app_demo_flow_BS_stake/part1/00002.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00006.png b/tests/snapshots/stax/test_app_mainmenu/00006.png index 692a8f8..2ddb5f8 100644 Binary files a/tests/snapshots/stax/test_app_mainmenu/00006.png and b/tests/snapshots/stax/test_app_mainmenu/00006.png differ diff --git a/tests/snapshots/stax/test_confirm/00000.png b/tests/snapshots/stax/test_confirm/00000.png new file mode 100644 index 0000000..560ecc8 Binary files /dev/null and b/tests/snapshots/stax/test_confirm/00000.png differ diff --git a/tests/snapshots/stax/test_confirm/00001.png b/tests/snapshots/stax/test_confirm/00001.png new file mode 100644 index 0000000..e0adbf4 Binary files /dev/null and b/tests/snapshots/stax/test_confirm/00001.png differ diff --git a/tests/snapshots/stax/test_generic_config/00000.png b/tests/snapshots/stax/test_generic_config/00000.png new file mode 100644 index 0000000..3ea6337 Binary files /dev/null and b/tests/snapshots/stax/test_generic_config/00000.png differ diff --git a/tests/snapshots/stax/test_generic_config/00001.png b/tests/snapshots/stax/test_generic_config/00001.png new file mode 100644 index 0000000..be5ef49 Binary files /dev/null and b/tests/snapshots/stax/test_generic_config/00001.png differ diff --git a/tests/snapshots/stax/test_generic_config/00002.png b/tests/snapshots/stax/test_generic_config/00002.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_generic_config/00002.png differ diff --git a/tests/snapshots/stax/test_generic_settings/00000.png b/tests/snapshots/stax/test_generic_settings/00000.png new file mode 100644 index 0000000..9396de3 Binary files /dev/null and b/tests/snapshots/stax/test_generic_settings/00000.png differ diff --git a/tests/snapshots/stax/test_generic_settings/00001.png b/tests/snapshots/stax/test_generic_settings/00001.png new file mode 100644 index 0000000..7655d91 Binary files /dev/null and b/tests/snapshots/stax/test_generic_settings/00001.png differ diff --git a/tests/snapshots/stax/test_generic_settings/00002.png b/tests/snapshots/stax/test_generic_settings/00002.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_generic_settings/00002.png differ diff --git a/tests/snapshots/stax/test_keypad_digits/00000.png b/tests/snapshots/stax/test_keypad_digits/00000.png new file mode 100644 index 0000000..8fbe454 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_digits/00000.png differ diff --git a/tests/snapshots/stax/test_keypad_digits/00001.png b/tests/snapshots/stax/test_keypad_digits/00001.png new file mode 100644 index 0000000..a055bb8 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_digits/00001.png differ diff --git a/tests/snapshots/stax/test_keypad_digits/00002.png b/tests/snapshots/stax/test_keypad_digits/00002.png new file mode 100644 index 0000000..cd6ae79 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_digits/00002.png differ diff --git a/tests/snapshots/stax/test_keypad_digits/00003.png b/tests/snapshots/stax/test_keypad_digits/00003.png new file mode 100644 index 0000000..28a3ba6 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_digits/00003.png differ diff --git a/tests/snapshots/stax/test_keypad_digits/00004.png b/tests/snapshots/stax/test_keypad_digits/00004.png new file mode 100644 index 0000000..889094a Binary files /dev/null and b/tests/snapshots/stax/test_keypad_digits/00004.png differ diff --git a/tests/snapshots/stax/test_keypad_digits/00005.png b/tests/snapshots/stax/test_keypad_digits/00005.png new file mode 100644 index 0000000..147cceb Binary files /dev/null and b/tests/snapshots/stax/test_keypad_digits/00005.png differ diff --git a/tests/snapshots/stax/test_keypad_pin/00000.png b/tests/snapshots/stax/test_keypad_pin/00000.png new file mode 100644 index 0000000..19ab5a2 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_pin/00000.png differ diff --git a/tests/snapshots/stax/test_keypad_pin/00001.png b/tests/snapshots/stax/test_keypad_pin/00001.png new file mode 100644 index 0000000..e189846 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_pin/00001.png differ diff --git a/tests/snapshots/stax/test_keypad_pin/00002.png b/tests/snapshots/stax/test_keypad_pin/00002.png new file mode 100644 index 0000000..d02be6d Binary files /dev/null and b/tests/snapshots/stax/test_keypad_pin/00002.png differ diff --git a/tests/snapshots/stax/test_keypad_pin/00003.png b/tests/snapshots/stax/test_keypad_pin/00003.png new file mode 100644 index 0000000..cb39990 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_pin/00003.png differ diff --git a/tests/snapshots/stax/test_keypad_pin/00004.png b/tests/snapshots/stax/test_keypad_pin/00004.png new file mode 100644 index 0000000..5348af3 Binary files /dev/null and b/tests/snapshots/stax/test_keypad_pin/00004.png differ diff --git a/tests/snapshots/stax/test_keypad_pin/00005.png b/tests/snapshots/stax/test_keypad_pin/00005.png new file mode 100644 index 0000000..147cceb Binary files /dev/null and b/tests/snapshots/stax/test_keypad_pin/00005.png differ diff --git a/tests/snapshots/stax/test_navigation_bar/00000.png b/tests/snapshots/stax/test_navigation_bar/00000.png new file mode 100644 index 0000000..ecf12a6 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_bar/00000.png differ diff --git a/tests/snapshots/stax/test_navigation_bar/00001.png b/tests/snapshots/stax/test_navigation_bar/00001.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_bar/00001.png differ diff --git a/tests/snapshots/stax/test_navigation_button/00000.png b/tests/snapshots/stax/test_navigation_button/00000.png new file mode 100644 index 0000000..8658d43 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_button/00000.png differ diff --git a/tests/snapshots/stax/test_navigation_button/00001.png b/tests/snapshots/stax/test_navigation_button/00001.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_button/00001.png differ diff --git a/tests/snapshots/stax/test_navigation_choice/00000.png b/tests/snapshots/stax/test_navigation_choice/00000.png new file mode 100644 index 0000000..050f868 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_choice/00000.png differ diff --git a/tests/snapshots/stax/test_navigation_choice/00001.png b/tests/snapshots/stax/test_navigation_choice/00001.png new file mode 100644 index 0000000..93eadd0 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_choice/00001.png differ diff --git a/tests/snapshots/stax/test_navigation_choice/00002.png b/tests/snapshots/stax/test_navigation_choice/00002.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_choice/00002.png differ diff --git a/tests/snapshots/stax/test_navigation_info/00000.png b/tests/snapshots/stax/test_navigation_info/00000.png new file mode 100644 index 0000000..6902abd Binary files /dev/null and b/tests/snapshots/stax/test_navigation_info/00000.png differ diff --git a/tests/snapshots/stax/test_navigation_info/00001.png b/tests/snapshots/stax/test_navigation_info/00001.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_info/00001.png differ diff --git a/tests/snapshots/stax/test_navigation_switch/00000.png b/tests/snapshots/stax/test_navigation_switch/00000.png new file mode 100644 index 0000000..a9d2351 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_switch/00000.png differ diff --git a/tests/snapshots/stax/test_navigation_switch/00001.png b/tests/snapshots/stax/test_navigation_switch/00001.png new file mode 100644 index 0000000..4b3d58e Binary files /dev/null and b/tests/snapshots/stax/test_navigation_switch/00001.png differ diff --git a/tests/snapshots/stax/test_navigation_switch/00002.png b/tests/snapshots/stax/test_navigation_switch/00002.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_navigation_switch/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_address_review_refused/00000.png b/tests/snapshots/stax/test_use_case_address_review_refused/00000.png deleted file mode 100644 index 32fddd4..0000000 Binary files a/tests/snapshots/stax/test_use_case_address_review_refused/00000.png and /dev/null differ diff --git a/tests/snapshots/stax/test_use_case_address_review_refused/00001.png b/tests/snapshots/stax/test_use_case_address_review_refused/00001.png deleted file mode 100644 index 8769a3e..0000000 Binary files a/tests/snapshots/stax/test_use_case_address_review_refused/00001.png and /dev/null differ diff --git a/tests/snapshots/stax/test_use_case_address_review_refused/00002.png b/tests/snapshots/stax/test_use_case_address_review_refused/00002.png deleted file mode 100644 index 94c91bb..0000000 Binary files a/tests/snapshots/stax/test_use_case_address_review_refused/00002.png and /dev/null differ diff --git a/tests/snapshots/stax/test_use_case_address_review_refused/00003.png b/tests/snapshots/stax/test_use_case_address_review_refused/00003.png deleted file mode 100644 index 5050f35..0000000 Binary files a/tests/snapshots/stax/test_use_case_address_review_refused/00003.png and /dev/null differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/BS_screen/00000.png b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/BS_screen/00000.png index 9696ae1..0463721 100644 Binary files a/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/BS_screen/00000.png and b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00000.png b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00000.png index 9696ae1..0463721 100644 Binary files a/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00000.png and b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00002.png b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00002.png index ad1c9fe..a4aa4b2 100644 Binary files a/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00002.png and b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png index 9696ae1..0463721 100644 Binary files a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/BS_screen/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_generic_review/00000.png b/tests/snapshots/stax/test_use_case_generic_review/00000.png new file mode 100644 index 0000000..adc717a Binary files /dev/null and b/tests/snapshots/stax/test_use_case_generic_review/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_generic_review/00001.png b/tests/snapshots/stax/test_use_case_generic_review/00001.png new file mode 100644 index 0000000..dd00e9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_generic_review/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_generic_review/00002.png b/tests/snapshots/stax/test_use_case_generic_review/00002.png new file mode 100644 index 0000000..f06cb29 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_generic_review/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_generic_review/00003.png b/tests/snapshots/stax/test_use_case_generic_review/00003.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_generic_review/00003.png differ diff --git a/tests/test_app_mainmenu.py b/tests/test_app_mainmenu.py index 0bcbd35..130e552 100644 --- a/tests/test_app_mainmenu.py +++ b/tests/test_app_mainmenu.py @@ -1,18 +1,41 @@ +from ragger.backend.interface import BackendInterface from ragger.firmware import Firmware -from ragger.navigator import NavInsID, NavIns +from ragger.navigator import Navigator, NavInsID, NavIns + +from application_client.nbgl_command_sender import NBGLCommandSender # In this test we check the behavior of the device main menu -def test_app_mainmenu(firmware, navigator, test_name, default_screenshot_path): +def test_app_mainmenu(firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: # Navigate in the main menu + instructions = [] if firmware.is_nano: - instructions = [ + instructions += [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, NavInsID.RIGHT_CLICK, - NavInsID.RIGHT_CLICK ] elif firmware is Firmware.STAX: - instructions = [ + instructions += [ NavInsID.USE_CASE_HOME_SETTINGS, NavIns(NavInsID.TOUCH, (200, 113)), NavIns(NavInsID.TOUCH, (200, 261)), @@ -23,7 +46,7 @@ def test_app_mainmenu(firmware, navigator, test_name, default_screenshot_path): NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT ] elif firmware is Firmware.FLEX: - instructions = [ + instructions += [ NavInsID.USE_CASE_HOME_SETTINGS, NavIns(NavInsID.TOUCH, (200, 113)), NavIns(NavInsID.TOUCH, (200, 300)), @@ -33,5 +56,67 @@ def test_app_mainmenu(firmware, navigator, test_name, default_screenshot_path): NavInsID.USE_CASE_SETTINGS_NEXT, NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT ] + + assert len(instructions) > 0 navigator.navigate_and_compare(default_screenshot_path, test_name, instructions, screen_change_before_first_instruction=False) + + +def test_generic_settings(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: + client = NBGLCommandSender(backend) + + instructions = [] + if firmware.is_nano: + instructions += [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + elif firmware is Firmware.STAX: + instructions += [ + NavIns(NavInsID.TOUCH, (200, 113)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT + ] + elif firmware is Firmware.FLEX: + instructions += [ + NavIns(NavInsID.TOUCH, (200, 113)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT + ] + + with client.test_generic_settings(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + backend.wait_for_home_screen() + + +def test_generic_config(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: + client = NBGLCommandSender(backend) + + instructions = [] + if firmware.is_nano: + instructions += [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + elif firmware is Firmware.STAX: + instructions += [ + NavIns(NavInsID.TOUCH, (200, 113)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT + ] + elif firmware is Firmware.FLEX: + instructions += [ + NavIns(NavInsID.TOUCH, (200, 113)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT + ] + + with client.test_generic_config(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + backend.wait_for_home_screen() diff --git a/tests/test_appname_cmd.py b/tests/test_appname_cmd.py index 1a4d6da..588467d 100644 --- a/tests/test_appname_cmd.py +++ b/tests/test_appname_cmd.py @@ -1,12 +1,16 @@ +from ragger.backend.interface import BackendInterface + from application_client.nbgl_command_sender import NBGLCommandSender from application_client.nbgl_response_unpacker import unpack_get_app_name_response +from utils import verify_name + # In this test we check that the GET_APP_NAME replies the application name -def test_app_name(backend): +def test_app_name(backend: BackendInterface) -> None: # Use the app interface instead of raw interface client = NBGLCommandSender(backend) # Send the GET_APP_NAME instruction to the app response = client.get_app_name() # Assert that we have received the correct appname - assert unpack_get_app_name_response(response.data) == "NBGL Tests" + verify_name(unpack_get_app_name_response(response.data)) diff --git a/tests/test_confirm.py b/tests/test_confirm.py new file mode 100644 index 0000000..e55cca5 --- /dev/null +++ b/tests/test_confirm.py @@ -0,0 +1,27 @@ +from ragger.backend.interface import BackendInterface +from ragger.firmware import Firmware +from ragger.navigator import Navigator, NavInsID + +from application_client.nbgl_command_sender import NBGLCommandSender + +def test_confirm(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: + client = NBGLCommandSender(backend) + + instructions = [] + if firmware.is_nano: + instructions += [ + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + instructions += [ + NavInsID.USE_CASE_CHOICE_CONFIRM, + ] + + with client.test_confirm(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + backend.wait_for_home_screen() diff --git a/tests/test_demo_flows.py b/tests/test_demo_flows.py index c422075..5626912 100644 --- a/tests/test_demo_flows.py +++ b/tests/test_demo_flows.py @@ -1,53 +1,108 @@ from ragger.firmware import Firmware -from ragger.navigator import NavInsID, NavIns +from ragger.navigator import Navigator, NavInsID, NavIns +from ragger.navigator.navigation_scenario import NavigateWithScenario -def test_app_demo_flow_send_BTC(firmware, navigator, scenario_navigator, test_name, default_screenshot_path): +def test_app_demo_flow_send_BTC(firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: # Navigate in the main menu - instructions = [ - NavIns(NavInsID.TOUCH, (200, 520 if firmware is Firmware.STAX else 440)), - NavIns(NavInsID.TOUCH, (200, 130)) - ] + if firmware.is_nano: + instructions = [ + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + instructions = [ + NavInsID.USE_CASE_CHOICE_CONFIRM, + NavIns(NavInsID.TOUCH, (200, 130)) + ] navigator.navigate_and_compare(default_screenshot_path, test_name+"/part1", instructions, screen_change_before_first_instruction=False, screen_change_after_last_instruction=False) scenario_navigator.review_approve(test_name=test_name+"/part2") -def test_app_demo_flow_swap_1inch(firmware, navigator, scenario_navigator, test_name, default_screenshot_path): - # Navigate in the main menu - instructions = [ - NavIns(NavInsID.TOUCH, (200, 520 if firmware is Firmware.STAX else 440)), - NavIns(NavInsID.TOUCH, (200, 230)), - NavIns(NavInsID.TOUCH, (230, 500 if firmware is Firmware.STAX else 420)), - NavIns(NavInsID.TOUCH, (350 if firmware is Firmware.STAX else 420, 310 if firmware is Firmware.STAX else 320)), - NavIns(NavInsID.TOUCH, (50, 50)), - NavIns(NavInsID.TOUCH, (50, 50)), - ] + +def test_app_demo_flow_swap_1inch(firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: + if firmware.is_nano: + instructions = [ + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + # Navigate in the main menu + instructions = [ + NavInsID.USE_CASE_CHOICE_CONFIRM, + NavIns(NavInsID.TOUCH, (200, 230)), + NavInsID.USE_CASE_CHOICE_CONFIRM, + NavIns(NavInsID.TOUCH, (350 if firmware is Firmware.STAX else 420, + 310 if firmware is Firmware.STAX else 320)), + NavIns(NavInsID.TOUCH, (50, 50)), + NavIns(NavInsID.TOUCH, (50, 50)), + ] navigator.navigate_and_compare(default_screenshot_path, test_name+"/part1", instructions, screen_change_before_first_instruction=False, screen_change_after_last_instruction=False) scenario_navigator.review_approve(test_name=test_name+"/part2") -def test_app_demo_flow_BS_stake(firmware, navigator, scenario_navigator, test_name, default_screenshot_path): - # Navigate in the main menu - instructions = [ - NavIns(NavInsID.TOUCH, (200, 520 if firmware is Firmware.STAX else 440)), - NavIns(NavInsID.TOUCH, (200, 320)), - NavInsID.USE_CASE_REVIEW_REJECT - ] + +def test_app_demo_flow_BS_stake(firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: + if firmware.is_nano: + instructions = [ + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + # Navigate in the main menu + instructions = [ + NavInsID.USE_CASE_CHOICE_CONFIRM, + NavIns(NavInsID.TOUCH, (200, 320)), + NavInsID.USE_CASE_REVIEW_REJECT + ] navigator.navigate_and_compare(default_screenshot_path, test_name+"/part1", instructions, screen_change_before_first_instruction=False, screen_change_after_last_instruction=False) scenario_navigator.review_approve(test_name=test_name+"/part2") -def test_app_demo_flow_SOL_receive(firmware, navigator, scenario_navigator, test_name, default_screenshot_path): - # Navigate in the main menu - instructions = [ - NavIns(NavInsID.TOUCH, (200, 520 if firmware is Firmware.STAX else 440)), - NavIns(NavInsID.TOUCH, (200, 420)) - ] + +def test_app_demo_flow_SOL_receive(firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: + if firmware.is_nano: + instructions = [ + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + # Navigate in the main menu + instructions = [ + NavInsID.USE_CASE_CHOICE_CONFIRM, + NavIns(NavInsID.TOUCH, (200, 420)) + ] navigator.navigate_and_compare(default_screenshot_path, test_name+"/part1", instructions, screen_change_before_first_instruction=False, diff --git a/tests/test_error_cmd.py b/tests/test_error_cmd.py index 7e55b88..9c7f72c 100644 --- a/tests/test_error_cmd.py +++ b/tests/test_error_cmd.py @@ -1,25 +1,27 @@ import pytest from ragger.error import ExceptionRAPDU +from ragger.backend.interface import BackendInterface + from application_client.nbgl_command_sender import CLA, InsType, P1, P2, Errors # Ensure the app returns an error when a bad CLA is used -def test_bad_cla(backend): +def test_bad_cla(backend: BackendInterface) -> None: with pytest.raises(ExceptionRAPDU) as e: backend.exchange(cla=CLA + 1, ins=InsType.GET_VERSION) assert e.value.status == Errors.SW_CLA_NOT_SUPPORTED # Ensure the app returns an error when a bad INS is used -def test_bad_ins(backend): +def test_bad_ins(backend: BackendInterface) -> None: with pytest.raises(ExceptionRAPDU) as e: backend.exchange(cla=CLA, ins=0xff) assert e.value.status == Errors.SW_INS_NOT_SUPPORTED # Ensure the app returns an error when a bad P1 or P2 is used -def test_wrong_p1p2(backend): +def test_wrong_p1p2(backend: BackendInterface) -> None: with pytest.raises(ExceptionRAPDU) as e: backend.exchange(cla=CLA, ins=InsType.GET_VERSION, p1=P1.P1_START + 1, p2=P2.P2_LAST) assert e.value.status == Errors.SW_WRONG_P1P2 @@ -35,7 +37,7 @@ def test_wrong_p1p2(backend): # Ensure the app returns an error when a bad data length is used -def test_wrong_data_length(backend): +def test_wrong_data_length(backend: BackendInterface) -> None: # APDUs must be at least 4 bytes: CLA, INS, P1, P2. with pytest.raises(ExceptionRAPDU) as e: backend.exchange_raw(bytes.fromhex("E00300")) diff --git a/tests/test_keypad.py b/tests/test_keypad.py new file mode 100644 index 0000000..9e69de8 --- /dev/null +++ b/tests/test_keypad.py @@ -0,0 +1,64 @@ +import pytest + +from ragger.backend.interface import BackendInterface +from ragger.firmware import Firmware +from ragger.navigator import Navigator, NavInsID, NavIns +from ragger.firmware.touch.positions import STAX_BUTTON_LOWER_RIGHT, FLEX_BUTTON_LOWER_RIGHT + +from application_client.nbgl_command_sender import NBGLCommandSender + + +def get_digit5_position(firmware: Firmware) -> tuple[int, int]: + if firmware == Firmware.STAX: + screen_height = 672 # px + screen_width = 400 # px + header_height = 88 # px + else: + screen_height = 600 # px + screen_width = 480 # px + header_height = 96 # px + + usable_height = screen_height - header_height + digit_x = screen_width // 2 + digit_y = header_height + usable_height // 2 + return digit_x, digit_y + + +def get_enter_position(firmware: Firmware) -> tuple[int, int]: + if firmware == Firmware.STAX: + return STAX_BUTTON_LOWER_RIGHT + return FLEX_BUTTON_LOWER_RIGHT + + +@pytest.mark.parametrize("mode", ["digits", "pin"]) +def test_keypad(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str, + mode: str) -> None: + if firmware.is_nano: + pytest.skip("Nano needs speculos API_LEVEL 23 for this test") + + client = NBGLCommandSender(backend) + + instructions = [] + if firmware.is_nano: + instructions += [ + NavInsID.BOTH_CLICK * 5 + ] + else: + digit5_pos = get_digit5_position(firmware) + instructions += [ + NavIns(NavInsID.TOUCH, digit5_pos), + NavIns(NavInsID.TOUCH, digit5_pos), + NavIns(NavInsID.TOUCH, digit5_pos), + NavIns(NavInsID.TOUCH, digit5_pos), + NavIns(NavInsID.TOUCH, get_enter_position(firmware)), + ] + + test_name += f"_{mode}" + p1 = 0x00 if mode == "pin" else 0x01 + with client.test_keypad(p1): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + backend.wait_for_home_screen() diff --git a/tests/test_name_version.py b/tests/test_name_version.py index d11ed28..ac2c70b 100644 --- a/tests/test_name_version.py +++ b/tests/test_name_version.py @@ -1,9 +1,13 @@ +from ragger.backend.interface import BackendInterface + from application_client.nbgl_command_sender import NBGLCommandSender from application_client.nbgl_response_unpacker import unpack_get_app_and_version_response +from utils import verify_version, verify_name + # Test a specific APDU asking BOLOS (and not the app) the name and version of the current app -def test_get_app_and_version(backend, backend_name): +def test_get_app_and_version(backend: BackendInterface) -> None: # Use the app interface instead of raw interface client = NBGLCommandSender(backend) # Send the special instruction to BOLOS @@ -11,5 +15,5 @@ def test_get_app_and_version(backend, backend_name): # Use an helper to parse the response, assert the values app_name, version = unpack_get_app_and_version_response(response.data) - assert app_name == "NBGL Tests" - assert version == "1.0.0" + verify_name(app_name) + verify_version(version) diff --git a/tests/test_navigation.py b/tests/test_navigation.py new file mode 100644 index 0000000..04d2080 --- /dev/null +++ b/tests/test_navigation.py @@ -0,0 +1,63 @@ +import pytest + +from ragger.backend.interface import BackendInterface +from ragger.firmware import Firmware +from ragger.navigator import Navigator, NavInsID, NavIns +from ragger.firmware.touch.positions import POSITIONS + +from application_client.nbgl_command_sender import NBGLCommandSender + + +@pytest.mark.parametrize("mode", ["info", "button", "switch", "choice", "bar"]) +def test_navigation(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str, + mode: str) -> None: + client = NBGLCommandSender(backend) + + if firmware.is_nano: + instructions = { + "info": [NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK], + "button": [NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK], + "switch": [ + NavInsID.BOTH_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK], + "choice": [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK], + "bar": [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK] + } + else: + instructions = { + "info": [], + "button": [], + "switch": [NavIns(NavInsID.TOUCH, (200, 113))], + "choice": [NavIns(NavInsID.TOUCH, POSITIONS["ChoiceList"][firmware][2])], + "bar": [] + } + instructions[mode] += [NavInsID.LEFT_HEADER_TAP] + + test_name += f"_{mode}" + p1 = { + "info": 0x00, + "button": 0x01, + "switch": 0x02, + "choice": 0x03, + "bar": 0x04 + } + + with client.test_navigation(p1[mode]): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions[mode]) + backend.wait_for_home_screen() diff --git a/tests/test_spinner.py b/tests/test_spinner.py index ce26466..cbe7751 100644 --- a/tests/test_spinner.py +++ b/tests/test_spinner.py @@ -1,16 +1,25 @@ +from ragger.backend.interface import BackendInterface +from ragger.firmware import Firmware +from ragger.navigator import Navigator, NavInsID, NavIns + from application_client.nbgl_command_sender import NBGLCommandSender -from ragger.navigator import NavInsID, NavIns -def test_spinner(backend, navigator, test_name, default_screenshot_path): +def test_spinner(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) - instructions = [ - NavIns(NavInsID.TOUCH), - NavIns(NavInsID.TOUCH), - NavIns(NavInsID.TOUCH), - NavIns(NavInsID.TOUCH) - ] + instructions = [] + if not firmware.is_nano: + instructions += [ + NavIns(NavInsID.TOUCH), + NavIns(NavInsID.TOUCH), + NavIns(NavInsID.TOUCH), + NavIns(NavInsID.TOUCH) + ] + with client.test_spinner(): navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) backend.wait_for_home_screen() - diff --git a/tests/test_use_case_address_review.py b/tests/test_use_case_address_review.py index 505a2d3..fdcfacd 100644 --- a/tests/test_use_case_address_review.py +++ b/tests/test_use_case_address_review.py @@ -1,59 +1,94 @@ -from application_client.nbgl_command_sender import NBGLCommandSender, SW_OK +from ragger.backend.interface import BackendInterface from ragger.firmware import Firmware -from ragger.navigator import NavInsID, NavIns +from ragger.navigator import Navigator, NavInsID, NavIns +from ragger.navigator.navigation_scenario import NavigateWithScenario + +from application_client.nbgl_command_sender import NBGLCommandSender, SW_OK -def test_use_case_address_review_accepted(backend, firmware, navigator, test_name, default_screenshot_path): +def test_use_case_address_review_accepted(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) - instructions = [ - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.TOUCH, (100, 500 if firmware is Firmware.STAX else 410)), - NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR), - NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), - NavIns(NavInsID.USE_CASE_STATUS_DISMISS) - ] + instructions = [] + if not firmware.is_nano: + instructions = [ + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.TOUCH, (100, 500 if firmware is Firmware.STAX else 410)), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), + NavIns(NavInsID.USE_CASE_STATUS_DISMISS) + ] with client.test_use_case_address_review(): - navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + if len(instructions) > 0: + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + else: + scenario_navigator.address_review_approve() status = client.get_async_response().status # Assert that we have received an approval assert status == SW_OK -def test_use_case_long_address_review_accepted(backend, firmware, navigator, test_name, default_screenshot_path): + +def test_use_case_long_address_review_accepted(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) - instructions = [ - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.TOUCH, (100, 500 if firmware is Firmware.STAX else 410)), - NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR), - NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), - NavIns(NavInsID.USE_CASE_STATUS_DISMISS) - ] + instructions = [] + if not firmware.is_nano: + instructions = [ + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.TOUCH, (100, 500 if firmware is Firmware.STAX else 410)), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), + NavIns(NavInsID.USE_CASE_STATUS_DISMISS) + ] with client.test_use_case_long_address_review(): - navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + if len(instructions) > 0: + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + else: + scenario_navigator.address_review_approve() status = client.get_async_response().status # Assert that we have received an approval assert status == SW_OK -def test_use_case_long_address_review_accepted_with_tags(backend, firmware, navigator, test_name, default_screenshot_path): + +def test_use_case_long_address_review_accepted_with_tags(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) - instructions = [ - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.TOUCH, (200, 370 if firmware is Firmware.STAX else 370)), - NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR), - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), - NavIns(NavInsID.USE_CASE_STATUS_DISMISS) - ] + instructions = [] + if not firmware.is_nano: + instructions = [ + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.TOUCH, (200, 370 if firmware is Firmware.STAX else 370)), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_EXIT_QR), + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM), + NavIns(NavInsID.USE_CASE_STATUS_DISMISS) + ] with client.test_use_case_long_address_review_with_tags(): - navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + if len(instructions) > 0: + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + else: + scenario_navigator.address_review_approve() status = client.get_async_response().status diff --git a/tests/test_use_case_legacy_review.py b/tests/test_use_case_legacy_review.py index 5f94bad..afccb8d 100644 --- a/tests/test_use_case_legacy_review.py +++ b/tests/test_use_case_legacy_review.py @@ -1,11 +1,20 @@ import pytest -from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK +from ragger.backend.interface import BackendInterface +from ragger.firmware import Firmware from ragger.error import ExceptionRAPDU -from ragger.navigator import NavInsID, NavIns +from ragger.navigator import Navigator, NavInsID, NavIns +from ragger.navigator.navigation_scenario import NavigateWithScenario + +from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK -def test_use_case_static_review_accepted(backend, scenario_navigator): +def test_use_case_static_review_accepted(backend: BackendInterface, + firmware: Firmware, + scenario_navigator: NavigateWithScenario) -> None: + if firmware.is_nano: + pytest.skip("Nano does not support legacy useCase on NBGL") + client = NBGLCommandSender(backend) with client.test_use_case_static_review(): @@ -16,7 +25,15 @@ def test_use_case_static_review_accepted(backend, scenario_navigator): # Assert that we have received an approval assert status == SW_OK -def test_use_case_static_review_refused(backend, navigator, test_name, default_screenshot_path): + +def test_use_case_static_review_refused(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: + if firmware.is_nano: + pytest.skip("Nano does not support legacy useCase on NBGL") + client = NBGLCommandSender(backend) instructions = [ @@ -33,13 +50,28 @@ def test_use_case_static_review_refused(backend, navigator, test_name, default_s assert e.value.status == Errors.SW_DENY assert len(e.value.data) == 0 -def test_use_case_light_review_accepted(backend, navigator, test_name, default_screenshot_path): + +def test_use_case_light_review_accepted(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) - instructions = [ - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.USE_CASE_CHOICE_CONFIRM) - ] + + instructions = [] + if firmware.is_nano: + instructions += [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + instructions += [ + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.USE_CASE_CHOICE_CONFIRM) + ] with client.test_use_case_light_review(): navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) @@ -49,15 +81,30 @@ def test_use_case_light_review_accepted(backend, navigator, test_name, default_s # Assert that we have received an approval assert status == SW_OK -def test_use_case_light_review_refused(backend, navigator, test_name, default_screenshot_path): + +def test_use_case_light_review_refused(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) - instructions = [ - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), - NavIns(NavInsID.USE_CASE_CHOICE_REJECT), - NavIns(NavInsID.USE_CASE_CHOICE_CONFIRM) - ] + instructions = [] + if firmware.is_nano: + instructions += [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + instructions += [ + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.USE_CASE_CHOICE_REJECT), + NavIns(NavInsID.USE_CASE_CHOICE_CONFIRM) + ] with pytest.raises(ExceptionRAPDU) as e: with client.test_use_case_light_review(): diff --git a/tests/test_use_case_review.py b/tests/test_use_case_review.py index 9e2c603..e005c03 100644 --- a/tests/test_use_case_review.py +++ b/tests/test_use_case_review.py @@ -1,11 +1,16 @@ import pytest -from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK +from ragger.backend.interface import BackendInterface from ragger.error import ExceptionRAPDU -from ragger.navigator import NavInsID +from ragger.firmware import Firmware +from ragger.navigator import Navigator, NavInsID +from ragger.navigator.navigation_scenario import NavigateWithScenario + +from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK -def test_use_case_review_accepted(backend, scenario_navigator): +def test_use_case_review_accepted(backend: BackendInterface, + scenario_navigator: NavigateWithScenario) -> None: client = NBGLCommandSender(backend) with client.test_use_case_review(): @@ -16,13 +21,20 @@ def test_use_case_review_accepted(backend, scenario_navigator): # Assert that we have received an approval assert status == SW_OK -def test_use_case_blind_signed_review_accepted(navigator, backend, scenario_navigator, test_name, default_screenshot_path): + +def test_use_case_blind_signed_review_accepted(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) + instructions = [NavInsID.RIGHT_CLICK] if firmware.is_nano else [NavInsID.USE_CASE_CHOICE_REJECT] with client.test_use_case_blind_signed_review(): navigator.navigate_and_compare(default_screenshot_path, test_name+"/BS_screen", - [NavInsID.USE_CASE_CHOICE_REJECT], + instructions, screen_change_after_last_instruction=False) scenario_navigator.review_approve() @@ -31,7 +43,15 @@ def test_use_case_blind_signed_review_accepted(navigator, backend, scenario_navi # Assert that we have received an approval assert status == SW_OK -def test_use_case_blind_signed_review_display_warning(navigator, backend, test_name, default_screenshot_path): + +def test_use_case_blind_signed_review_display_warning(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: + if firmware.is_nano: + pytest.skip("Nano does not support this use case with warning screen") + client = NBGLCommandSender(backend) instructions = [ @@ -41,13 +61,14 @@ def test_use_case_blind_signed_review_display_warning(navigator, backend, test_n NavInsID.USE_CASE_REVIEW_REJECT, NavInsID.USE_CASE_CHOICE_CONFIRM ] - with pytest.raises(ExceptionRAPDU) as e: + with pytest.raises(ExceptionRAPDU): with client.test_use_case_blind_signed_review(): navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) -def test_use_case_review_refused(backend, scenario_navigator): +def test_use_case_review_refused(backend: BackendInterface, + scenario_navigator: NavigateWithScenario) -> None: client = NBGLCommandSender(backend) with pytest.raises(ExceptionRAPDU) as e: @@ -57,3 +78,41 @@ def test_use_case_review_refused(backend, scenario_navigator): # Assert that we have received a refusal assert e.value.status == Errors.SW_DENY assert len(e.value.data) == 0 + + +def test_use_case_generic_review(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: + client = NBGLCommandSender(backend) + + instructions = [] + if firmware.is_nano: + instructions += [ + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.RIGHT_CLICK, + NavInsID.BOTH_CLICK, + ] + else: + if firmware == Firmware.FLEX: + instructions += [ + NavInsID.SWIPE_CENTER_TO_LEFT, + ] + instructions += [ + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.USE_CASE_CHOICE_CONFIRM, + ] + + with client.test_generic_review(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + backend.wait_for_home_screen() + + status = client.get_async_response().status + + # Assert that we have received an approval + assert status == SW_OK diff --git a/tests/test_use_case_streaming_review.py b/tests/test_use_case_streaming_review.py index ed63e06..a3b218f 100644 --- a/tests/test_use_case_streaming_review.py +++ b/tests/test_use_case_streaming_review.py @@ -1,12 +1,16 @@ import pytest -from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK +from ragger.backend.interface import BackendInterface from ragger.error import ExceptionRAPDU from ragger.firmware import Firmware -from ragger.navigator import NavInsID, NavIns +from ragger.navigator import Navigator, NavInsID, NavIns +from ragger.navigator.navigation_scenario import NavigateWithScenario + +from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK -def test_use_case_streaming_review_accepted(backend, scenario_navigator): +def test_use_case_streaming_review_accepted(backend: BackendInterface, + scenario_navigator: NavigateWithScenario) -> None: client = NBGLCommandSender(backend) with client.test_use_case_streaming_review(): @@ -17,13 +21,20 @@ def test_use_case_streaming_review_accepted(backend, scenario_navigator): # Assert that we have received an approval assert status == SW_OK -def test_use_case_blind_signed_streaming_review_accepted(navigator, backend, scenario_navigator, test_name, default_screenshot_path): + +def test_use_case_blind_signed_streaming_review_accepted(backend: BackendInterface, + firmware: Firmware, + navigator: Navigator, + scenario_navigator: NavigateWithScenario, + test_name: str, + default_screenshot_path: str) -> None: client = NBGLCommandSender(backend) + instructions = [NavInsID.RIGHT_CLICK] if firmware.is_nano else [NavInsID.USE_CASE_CHOICE_REJECT] with client.test_use_case_blind_signed_streaming_review(): navigator.navigate_and_compare(default_screenshot_path, test_name+"/BS_screen", - [NavInsID.USE_CASE_CHOICE_REJECT], + instructions, screen_change_after_last_instruction=False) scenario_navigator.review_approve() @@ -32,13 +43,22 @@ def test_use_case_blind_signed_streaming_review_accepted(navigator, backend, sce # Assert that we have received an approval assert status == SW_OK + # display the long value field with more button -def test_use_case_streaming_review_accepted_with_more(backend, firmware, navigator, test_name, default_screenshot_path): +def test_use_case_streaming_review_accepted_with_more(firmware: Firmware, + backend: BackendInterface, + navigator: Navigator, + test_name: str, + default_screenshot_path: str) -> None: + if firmware.is_nano: + pytest.skip("Nano does not support legacy useCase on NBGL") + client = NBGLCommandSender(backend) # Navigate in the main menu + instructions = [] if firmware is Firmware.STAX: - instructions = [ + instructions += [ NavInsID.SWIPE_CENTER_TO_LEFT, NavInsID.SWIPE_CENTER_TO_LEFT, NavInsID.SWIPE_CENTER_TO_LEFT, @@ -50,7 +70,7 @@ def test_use_case_streaming_review_accepted_with_more(backend, firmware, navigat NavInsID.USE_CASE_REVIEW_CONFIRM ] elif firmware is Firmware.FLEX: - instructions = [ + instructions += [ NavInsID.SWIPE_CENTER_TO_LEFT, NavInsID.SWIPE_CENTER_TO_LEFT, NavInsID.SWIPE_CENTER_TO_LEFT, @@ -62,6 +82,7 @@ def test_use_case_streaming_review_accepted_with_more(backend, firmware, navigat NavInsID.USE_CASE_REVIEW_CONFIRM ] + assert len(instructions) > 0 with client.test_use_case_streaming_review(): navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) @@ -70,7 +91,9 @@ def test_use_case_streaming_review_accepted_with_more(backend, firmware, navigat # Assert that we have received an approval assert status == SW_OK -def test_use_case_streaming_review_refused(backend, scenario_navigator): + +def test_use_case_streaming_review_refused(backend: BackendInterface, + scenario_navigator: NavigateWithScenario) -> None: client = NBGLCommandSender(backend) with pytest.raises(ExceptionRAPDU) as e: diff --git a/tests/test_version_cmd.py b/tests/test_version_cmd.py index eb0c25a..a5697ae 100644 --- a/tests/test_version_cmd.py +++ b/tests/test_version_cmd.py @@ -1,16 +1,17 @@ +from ragger.backend.interface import BackendInterface + from application_client.nbgl_command_sender import NBGLCommandSender from application_client.nbgl_response_unpacker import unpack_get_version_response -# Taken from the Makefile, to update every time the Makefile version is bumped -MAJOR = 1 -MINOR = 0 -PATCH = 0 + +from utils import verify_version # In this test we check the behavior of the device when asked to provide the app version -def test_version(backend): +def test_version(backend: BackendInterface) -> None: # Use the app interface instead of raw interface client = NBGLCommandSender(backend) # Send the GET_VERSION instruction rapdu = client.get_version() # Use an helper to parse the response, assert the values - assert unpack_get_version_response(rapdu.data) == (MAJOR, MINOR, PATCH) + MAJOR, MINOR, PATCH = unpack_get_version_response(rapdu.data) + verify_version(f"{MAJOR}.{MINOR}.{PATCH}") diff --git a/tests/usage.md b/tests/usage.md index f24d63c..dc2fbfa 100644 --- a/tests/usage.md +++ b/tests/usage.md @@ -2,12 +2,11 @@ This framework allows testing the application on the Speculos emulator or on a real device using LedgerComm or LedgerWallet - ## Quickly get started with Ragger and Speculos ### Install ragger and dependencies -``` +```shell pip install --extra-index-url https://test.pypi.org/simple/ -r requirements.txt sudo apt-get update && sudo apt-get install qemu-user-static ``` @@ -16,7 +15,8 @@ sudo apt-get update && sudo apt-get install qemu-user-static The application to test must be compiled for all required devices. You can use for this the container `ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite`: -``` + +```shell docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest cd # replace with the name of your app, (eg boilerplate) docker run --user "$(id -u)":"$(id -g)" --rm -ti -v "$(realpath .):/app" --privileged -v "/dev/bus/usb:/dev/bus/usb" ledger-app-builder-lite:latest @@ -27,17 +27,19 @@ exit ### Run a simple test using the Speculos emulator You can use the following command to get your first experience with Ragger and Speculos -``` + +```shell pytest -v --tb=short --device nanox --display ``` -Or you can refer to the section `Available pytest options` to configure the options you want to use +Or you can refer to the section `Available pytest options` to configure the options you want to use ### Run a simple test using a real device The application to test must be loaded and started on a Ledger device plugged in USB. You can use for this the container `ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite`: -``` + +```shell docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest cd app-/ # replace with the name of your app, (eg boilerplate) docker run --user "$(id -u)":"$(id -g)" --rm -ti -v "$(realpath .):/app" --privileged -v "/dev/bus/usb:/dev/bus/usb" ledger-app-builder-lite:latest @@ -47,28 +49,30 @@ exit You can use the following command to get your first experience with Ragger and Ledgerwallet on a NANOX. Make sure that the device is plugged, unlocked, and that the tested application is open. -``` + +```shell pytest -v --tb=short --device nanox --backend ledgerwallet ``` -Or you can refer to the section `Available pytest options` to configure the options you want to use +Or you can refer to the section `Available pytest options` to configure the options you want to use ## Available pytest options Standard useful pytest options -``` + +```shell -v formats the test summary in a readable way -s enable logs for successful tests, on Speculos it will enable app logs if compiled with DEBUG=1 -k only run the tests that contain in their names --tb=short in case of errors, formats the test traceback in a readable way -``` +``` Custom pytest options -``` + +```shell --device run the test on the specified device [nanox,nanosp,stax,flex,all]. This parameter is mandatory --backend run the tests against the backend [speculos, ledgercomm, ledgerwallet]. Speculos is the default --display on Speculos, enables the display of the app screen using QT --golden_run on Speculos, screen comparison functions will save the current screen instead of comparing --log_apdu_file log all apdu exchanges to the file in parameter. The previous file content is erased -``` - +``` diff --git a/tests/utils.py b/tests/utils.py new file mode 100644 index 0000000..7a8f960 --- /dev/null +++ b/tests/utils.py @@ -0,0 +1,54 @@ +from pathlib import Path +from typing import List +import re + + +def verify_name(name: str) -> None: + """Verify the app name, based on defines in Makefile + + Args: + name (str): Name to be checked + """ + + name_str = [] + lines = _read_makefile() + name_re = re.compile(r"^APPNAME\s?=\s?\"?(?P[ a-zA-Z0-9_]+)\"?", re.I) + for line in lines: + info = name_re.match(line) + if info: + dinfo = info.groupdict() + name_str.append(dinfo["val"]) + assert name in name_str + + +def verify_version(version: str) -> None: + """Verify the app version, based on defines in Makefile + + Args: + Version (str): Version to be checked + """ + + vers_dict = {} + vers_str = "" + lines = _read_makefile() + version_re = re.compile(r"^APPVERSION_(?P\w)\s?=\s?(?P\d*)", re.I) + for line in lines: + info = version_re.match(line) + if info: + dinfo = info.groupdict() + vers_dict[dinfo["part"]] = dinfo["val"] + try: + vers_str = f"{vers_dict['M']}.{vers_dict['N']}.{vers_dict['P']}" + except KeyError: + pass + assert version == vers_str + + +def _read_makefile() -> List[str]: + """Read lines from the parent Makefile """ + + parent = Path(__file__).parent.parent.resolve() + makefile = f"{parent}/Makefile" + with open(makefile, "r", encoding="utf-8") as f_p: + lines = f_p.readlines() + return lines