diff --git a/.github/workflows/build_and_functional_tests.yml b/.github/workflows/build_and_functional_tests.yml index c92fc21..5d03a13 100644 --- a/.github/workflows/build_and_functional_tests.yml +++ b/.github/workflows/build_and_functional_tests.yml @@ -10,6 +10,15 @@ name: Build and run functional tests using ragger through reusable workflow on: workflow_dispatch: + inputs: + golden_run: + type: choice + required: true + default: 'Raise an error (default)' + description: CI behavior if the test snaphots are different than expected. + options: + - 'Raise an error (default)' + - 'Open a PR' push: branches: - master @@ -30,3 +39,4 @@ jobs: uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1 with: download_app_binaries_artifact: "compiled_app_binaries" + regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }} diff --git a/.github/workflows/codeql_checks.yml b/.github/workflows/codeql_checks.yml index 73c3f43..2ac43ed 100644 --- a/.github/workflows/codeql_checks.yml +++ b/.github/workflows/codeql_checks.yml @@ -18,7 +18,7 @@ jobs: name: Analyse strategy: matrix: - sdk: ["$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK"] + sdk: ["$STAX_SDK", "$FLEX_SDK"] #'cpp' covers C and C++ language: [ 'cpp' ] runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 99d1c00..5fe0da1 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ doc/latex # Virtual env for sideload (macOS and Windows) ledger/ + +# Vscode +.vscode/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index b7fb15c..8651c8a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,4 +16,7 @@ "editor.formatOnSave": false, "python.terminal.activateEnvironment": false, "git.ignoreLimitWarning": true, + "ledgerDevTools.appSettings": { + "selectedDevice": "Nano S" + }, } diff --git a/Makefile b/Makefile index 9240217..309b801 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ include $(BOLOS_SDK)/Makefile.defines # Mandatory configuration # ######################################## # Application name -APPNAME = "NBGL_Tests" +APPNAME = "NBGL Tests" # Application version APPVERSION_M = 1 diff --git a/README.md b/README.md index 97880a5..fc3561a 100644 --- a/README.md +++ b/README.md @@ -1,216 +1,7 @@ -[![Ensure compliance with Ledger guidelines](https://github.com/LedgerHQ/app-boilerplate/actions/workflows/guidelines_enforcer.yml/badge.svg)](https://github.com/LedgerHQ/app-boilerplate/actions/workflows/guidelines_enforcer.yml) [![Build and run functional tests using ragger through reusable workflow](https://github.com/LedgerHQ/app-boilerplate/actions/workflows/build_and_functional_tests.yml/badge.svg?branch=master)](https://github.com/LedgerHQ/app-boilerplate/actions/workflows/build_and_functional_tests.yml) +[![Ensure compliance with Ledger guidelines](https://github.com/LedgerHQ/app-nbgl-test/actions/workflows/guidelines_enforcer.yml/badge.svg)](https://github.com/LedgerHQ/app-nbgl-test/actions/workflows/guidelines_enforcer.yml) [![Build and run functional tests using ragger through reusable workflow](https://github.com/LedgerHQ/app-nbgl-test/actions/workflows/build_and_functional_tests.yml/badge.svg?branch=master)](https://github.com/LedgerHQ/app-nbgl-test/actions/workflows/build_and_functional_tests.yml) -# Ledger NBGL_Tests Application +# Ledger NBGL Tests Application -This is a boilerplate application which can be forked to start a new project for the Ledger Nano X/SP, Stax and Flex. +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. -## Quick start guide - -### With VSCode - -You can quickly setup a convenient environment to build and test your application by using [Ledger's VSCode developer tools extension](https://marketplace.visualstudio.com/items?itemName=LedgerHQ.ledger-dev-tools) which leverages the [ledger-app-dev-tools](https://github.com/LedgerHQ/ledger-app-builder/pkgs/container/ledger-app-builder%2Fledger-app-dev-tools) docker image. - -It will allow you, whether you are developing on macOS, Windows or Linux to quickly **build** your apps, **test** them on **Speculos** and **load** them on any supported device. - -* Install and run [Docker](https://www.docker.com/products/docker-desktop/). -* Make sure you have an X11 server running : - * On Ubuntu Linux, it should be running by default. - * On macOS, install and launch [XQuartz](https://www.xquartz.org/) (make sure to go to XQuartz > Preferences > Security and check "Allow client connections"). - * On Windows, install and launch [VcXsrv](https://sourceforge.net/projects/vcxsrv/) (make sure to configure it to disable access control). -* Install [VScode](https://code.visualstudio.com/download) and add [Ledger's extension](https://marketplace.visualstudio.com/items?itemName=LedgerHQ.ledger-dev-tools). -* Open a terminal and clone `app-boilerplate` with `git clone git@github.com:LedgerHQ/app-boilerplate.git`. -* Open the `app-boilerplate` folder with VSCode. -* Use Ledger extension's sidebar menu or open the tasks menu with `ctrl + shift + b` (`command + shift + b` on a Mac) to conveniently execute actions : - * Build the app for the device model of your choice with `Build`. - * Test your binary on [Speculos](https://github.com/LedgerHQ/speculos) with `Run with Speculos`. - * You can also run functional tests, load the app on a physical device, and more. - -:information_source: The terminal tab of VSCode will show you what commands the extension runs behind the scene. - -### With a terminal - -The [ledger-app-dev-tools](https://github.com/LedgerHQ/ledger-app-builder/pkgs/container/ledger-app-builder%2Fledger-app-dev-tools) docker image contains all the required tools and libraries to **build**, **test** and **load** an application. - -You can download it from the ghcr.io docker repository: - -```shell -sudo docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest -``` - -You can then enter this development environment by executing the following command from the directory of the application `git` repository: - -**Linux (Ubuntu)** - -```shell -sudo docker run --rm -ti --user "$(id -u):$(id -g)" --privileged -v "/dev/bus/usb:/dev/bus/usb" -v "$(realpath .):/app" ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest -``` - -**macOS** - -```shell -sudo docker run --rm -ti --user "$(id -u):$(id -g)" --privileged -v "$(pwd -P):/app" ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest -``` - -**Windows (with PowerShell)** - -```shell -docker run --rm -ti --privileged -v "$(Get-Location):/app" ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest -``` - -The application's code will be available from inside the docker container, you can proceed to the following compilation steps to build your app. - -## Compilation and load - -To easily setup a development environment for compilation and loading on a physical device, you can use the [VSCode integration](#with-vscode) whether you are on Linux, macOS or Windows. - -If you prefer using a terminal to perform the steps manually, you can use the guide below. - -### Compilation - -Setup a compilation environment by following the [shell with docker approach](#with-a-terminal). - -From inside the container, use the following command to build the app : - -```shell -make DEBUG=1 # compile optionally with PRINTF -``` - -You can choose which device to compile and load for by setting the `BOLOS_SDK` environment variable to the following values : - -* `BOLOS_SDK=$NANOX_SDK` -* `BOLOS_SDK=$NANOSP_SDK` -* `BOLOS_SDK=$STAX_SDK` - -By default this variable is set to build/load for Nano S+. - -### Loading on a physical device - -This step will vary slightly depending on your platform. - -:information_source: Your physical device must be connected, unlocked and the screen showing the dashboard (not inside an application). - -**Linux (Ubuntu)** - -First make sure you have the proper udev rules added on your host : - -```shell -# Run these commands on your host, from the app's source folder. -sudo cp .vscode/20-ledger.ledgerblue.rules /etc/udev/rules.d/ -sudo udevadm control --reload-rules -sudo udevadm trigger -``` - -Then once you have [opened a terminal](#with-a-terminal) in the `app-builder` image and [built the app](#compilation-and-load) for the device you want, run the following command : - -```shell -# Run this command from the app-builder container terminal. -make load # load the app on a Nano S+ by default -``` - -[Setting the BOLOS_SDK environment variable](#compilation-and-load) will allow you to load on whichever supported device you want. - -**macOS / Windows (with PowerShell)** - -:information_source: It is assumed you have [Python](https://www.python.org/downloads/) installed on your computer. - -Run these commands on your host from the app's source folder once you have [built the app](#compilation-and-load) for the device you want : - -```shell -# Install Python virtualenv -python3 -m pip install virtualenv -# Create the 'ledger' virtualenv -python3 -m virtualenv ledger -``` - -Enter the Python virtual environment - -* macOS : `source ledger/bin/activate` -* Windows : `.\ledger\Scripts\Activate.ps1` - -```shell -# Install Ledgerblue (tool to load the app) -python3 -m pip install ledgerblue -# Load the app. -python3 -m ledgerblue.runScript --scp --fileName bin/app.apdu --elfFile bin/app.elf -``` - -## Test - -The boilerplate app comes with functional tests implemented with Ledger's [Ragger](https://github.com/LedgerHQ/ragger) test framework. - -### macOS / Windows - -To test your app on macOS or Windows, it is recommended to use [Ledger's VS Code extension](#with-vscode) to quickly setup a working test environment. - -You can use the following sequence of tasks and commands (all accessible in the **extension sidebar menu**) : - -* `Select build target` -* `Build app` - -Then you can choose to execute the functional tests : - -* Use `Run tests`. - -Or simply run the app on the Speculos emulator : - -* `Run with Speculos`. - -### Linux (Ubuntu) - -On Linux, you can use [Ledger's VS Code extension](#with-vscode) to run the tests. If you prefer not to, open a terminal and follow the steps below. - -Install the tests requirements : - -```shell -pip install -r tests/requirements.txt -``` - -Then you can : - -Run the functional tests (here for nanos+ but available for any device once you have built the binaries) : - -```shell -pytest tests/ --tb=short -v --device nanosp -``` - -Or run your app directly with Speculos - -```shell -speculos --model nanosp build/nanos2/bin/app.elf -``` - -## Documentation - -High level documentation such as [application specification](APP_SPECIFICATION.md), [APDU](doc/APDU.md) and [transaction serialization](doc/TRANSACTION.md) are included in developer documentation which can be generated with [doxygen](https://www.doxygen.nl) - -```shell -doxygen .doxygen/Doxyfile -``` - -the process outputs HTML and LaTeX documentations in `doc/html` and `doc/latex` folders. - -## Continuous Integration - -The flow processed in [GitHub Actions](https://github.com/features/actions) is the following: - -- Ledger guidelines enforcer which verifies that an app is compliant with Ledger guidelines. The successful completion of this reusable workflow is a mandatory step for an app to be available on the Ledger application store. More information on the guidelines can be found in the repository [ledger-app-workflow](https://github.com/LedgerHQ/ledger-app-workflows) -- Code formatting with [clang-format](http://clang.llvm.org/docs/ClangFormat.html) -- Compilation of the application for all Ledger hardware in [ledger-app-builder](https://github.com/LedgerHQ/ledger-app-builder) -- Unit tests of C functions with [cmocka](https://cmocka.org/) (see [unit-tests/](unit-tests/)) -- End-to-end tests with [Speculos](https://github.com/LedgerHQ/speculos) emulator and [ragger](https://github.com/LedgerHQ/ragger) (see [tests/](tests/)) -- Code coverage with [gcov](https://gcc.gnu.org/onlinedocs/gcc/Gcov.html)/[lcov](http://ltp.sourceforge.net/coverage/lcov.php) and upload to [codecov.io](https://about.codecov.io) -- Documentation generation with [doxygen](https://www.doxygen.nl) - -It outputs 3 artifacts: -- `compiled_app_binaries` within binary files of the build process for each device -- `code-coverage` within HTML details of code coverage -- `documentation` within HTML auto-generated documentation - -## Are you developing an application for Ledger devices? - -If so, This boilerplate will help you get started. - -For a smooth and quick integration: - -- See the developers’ documentation on the [Developer Portal](https://developers.ledger.com/), and -- [Go on Discord](https://developers.ledger.com/discord-pro/) to chat with developer support and the developer community. +It also ensures that there are no regression issues by using a set of tests. diff --git a/glyphs/app_nbgl_tests_64px.png b/glyphs/app_nbgl_tests_64px.png index e3489ca..4f485e1 100755 Binary files a/glyphs/app_nbgl_tests_64px.png and b/glyphs/app_nbgl_tests_64px.png differ diff --git a/icons/app_nbgl_tests_32px.png b/icons/app_nbgl_tests_32px.png index 3df668c..77bff3f 100755 Binary files a/icons/app_nbgl_tests_32px.png and b/icons/app_nbgl_tests_32px.png differ diff --git a/icons/app_nbgl_tests_40px.png b/icons/app_nbgl_tests_40px.png index 0ef3fcc..c7f33d7 100755 Binary files a/icons/app_nbgl_tests_40px.png and b/icons/app_nbgl_tests_40px.png differ diff --git a/ledger_app.toml b/ledger_app.toml index 3ca01d3..08a150f 100644 --- a/ledger_app.toml +++ b/ledger_app.toml @@ -1,7 +1,7 @@ [app] build_directory = "./" sdk = "C" -devices = ["nanox", "nanos+", "stax", "flex"] +devices = ["stax", "flex"] [tests] unit_directory = "./unit-tests/" diff --git a/src/apdu/dispatcher.c b/src/apdu/dispatcher.c index 55857eb..458b34b 100644 --- a/src/apdu/dispatcher.c +++ b/src/apdu/dispatcher.c @@ -23,13 +23,13 @@ #include "ledger_assert.h" #include "dispatcher.h" -#include "../constants.h" -#include "../globals.h" -#include "../types.h" -#include "../sw.h" -#include "../handler/get_version.h" -#include "../handler/get_app_name.h" -#include "../handler/nbgl_tests.h" +#include "constants.h" +#include "globals.h" +#include "types.h" +#include "sw.h" +#include "get_version.h" +#include "get_app_name.h" +#include "display.h" int apdu_dispatcher(const command_t *cmd) { LEDGER_ASSERT(cmd != NULL, "NULL cmd"); @@ -51,18 +51,57 @@ int apdu_dispatcher(const command_t *cmd) { } return handler_get_app_name(); - case TEST_REVIEW1: + case TEST_SPINNER: + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_spinner(); + case TEST_USE_CASE_REVIEW: + // P1 & P2 may be used later as test/sub-test number + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_review(false); + case TEST_USE_CASE_REVIEW_BLIND_SIGNING: + // P1 & P2 may be used later as test/sub-test number + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_review(true); + case TEST_USE_CASE_ADDRESS_REVIEW: + if (cmd->p1 == 0) { + return ui_display_address_review(); + } else if (cmd->p1 == 1) { + return ui_display_long_address_review(); + } else if (cmd->p1 == 2) { + return ui_display_long_address_review_with_tags(); + } + return io_send_sw(SW_WRONG_P1P2); + case TEST_USE_CASE_STREAMING_REVIEW: + // P1 & P2 may be used later as test/sub-test number + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_streaming_review(false); + + case TEST_USE_CASE_STREAMING_REVIEW_BLIND_SIGNING: + // P1 & P2 may be used later as test/sub-test number + if (cmd->p1 != 0 || cmd->p2 != 0) { + return io_send_sw(SW_WRONG_P1P2); + } + return ui_display_streaming_review(true); + case TEST_USE_CASE_STATIC_REVIEW: // P1 & P2 may be used later as test/sub-test number if (cmd->p1 != 0 || cmd->p2 != 0) { return io_send_sw(SW_WRONG_P1P2); } - return handler_test_transaction_review(cmd->p1, cmd->p2); - case TEST_REVIEW2: + return ui_display_static_review(); + case TEST_USE_CASE_LIGHT_REVIEW: // P1 & P2 may be used later as test/sub-test number if (cmd->p1 != 0 || cmd->p2 != 0) { return io_send_sw(SW_WRONG_P1P2); } - return handler_test_address_review(cmd->p1, cmd->p2); + return ui_display_light_review(); default: return io_send_sw(SW_INS_NOT_SUPPORTED); } diff --git a/src/app_main.c b/src/app_main.c index feb730d..48edeaa 100644 --- a/src/app_main.c +++ b/src/app_main.c @@ -25,8 +25,8 @@ #include "globals.h" #include "io.h" #include "sw.h" -#include "ui/menu.h" -#include "apdu/dispatcher.h" +#include "display.h" +#include "dispatcher.h" const internal_storage_t N_storage_real; @@ -43,6 +43,9 @@ void app_main() { ui_menu_main(); + // initialize ticker event counter + G_ticker_counter = -1; + // Initialize the NVM data if required if (N_storage.initialized != 0x01) { internal_storage_t storage; diff --git a/src/globals.h b/src/globals.h index bb1011e..fee5800 100644 --- a/src/globals.h +++ b/src/globals.h @@ -34,3 +34,8 @@ typedef struct internal_storage_t { extern const internal_storage_t N_storage_real; #define N_storage (*(volatile internal_storage_t *) PIC(&N_storage_real)) + +/** + * Global ticker events counter. + */ +extern int G_ticker_counter; diff --git a/src/handler/nbgl_test_review.c b/src/handler/nbgl_test_review.c deleted file mode 100644 index 7bdfcd9..0000000 --- a/src/handler/nbgl_test_review.c +++ /dev/null @@ -1,54 +0,0 @@ -/***************************************************************************** - * 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. - *****************************************************************************/ - -#include // uint*_t -#include // bool -#include // size_t -#include // memset, explicit_bzero - -#include "os.h" - -#include "nbgl_tests.h" -#include "../sw.h" -#include "../globals.h" -#include "../ui/display.h" - -int handler_test_transaction_review(uint8_t test_num, uint8_t sub_test_num) { - // at the time-being, only 1 test - if (test_num > 0) { - return io_send_sw(SW_WRONG_P1P2); - } - // at the time-being, only 1 sub-test - if (sub_test_num > 0) { - return io_send_sw(SW_WRONG_P1P2); - } - - return ui_display_transaction(); -} - -int handler_test_address_review(uint8_t test_num, uint8_t sub_test_num) { - // at the time-being, only 1 test - if (test_num > 0) { - return io_send_sw(SW_WRONG_P1P2); - } - // at the time-being, only 1 sub-test - if (sub_test_num > 0) { - return io_send_sw(SW_WRONG_P1P2); - } - - return ui_display_address(); -} diff --git a/src/handler/nbgl_tests.h b/src/handler/nbgl_tests.h deleted file mode 100644 index 182031e..0000000 --- a/src/handler/nbgl_tests.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include // uint*_t -#include // bool - -/** - * Handler for @ref TEST_REVIEW1 command. Executes the test - * - * - * @param[in] test_num - * Index of the test. - * @param[in] sub_test_num - * Index of the sub-test. - * - * @return zero or positive integer if success, negative integer otherwise. - * - */ -int handler_test_transaction_review(uint8_t test_num, uint8_t sub_test_num); - -/** - * Handler for @ref TEST_REVIEW2 command. Executes the test - * - * - * @param[in] test_num - * Index of the test. - * @param[in] sub_test_num - * Index of the sub-test. - * - * @return zero or positive integer if success, negative integer otherwise. - * - */ -int handler_test_address_review(uint8_t test_num, uint8_t sub_test_num); diff --git a/src/types.h b/src/types.h index 0e29f75..fbb1e39 100644 --- a/src/types.h +++ b/src/types.h @@ -13,6 +13,12 @@ typedef enum { GET_VERSION = 0x03, /// version of the application GET_APP_NAME = 0x04, /// name of the application - TEST_REVIEW1 = 0x05, /// - TEST_REVIEW2 = 0x06 /// + TEST_USE_CASE_REVIEW = 0x05, + TEST_USE_CASE_REVIEW_BLIND_SIGNING = 0x06, + TEST_USE_CASE_STREAMING_REVIEW = 0x07, + TEST_USE_CASE_STREAMING_REVIEW_BLIND_SIGNING = 0x08, + TEST_USE_CASE_ADDRESS_REVIEW = 0x09, + TEST_SPINNER = 0x0A, + TEST_USE_CASE_STATIC_REVIEW = 0x0B, + TEST_USE_CASE_LIGHT_REVIEW = 0x0C } command_e; diff --git a/src/ui/display.h b/src/ui/display.h index 3148e4a..2b67bdf 100644 --- a/src/ui/display.h +++ b/src/ui/display.h @@ -3,22 +3,14 @@ #include // bool /** - * Callback to reuse action with approve/reject in step FLOW. + * Show main menu (ready screen, version, about, quit). */ -typedef void (*action_validate_cb)(bool); - -/** - * launch transaction review. - * - * @return 0 if success, negative integer otherwise. - * - */ -int ui_display_transaction(void); - -/** - * launch address review. - * - * @return 0 if success, negative integer otherwise. - * - */ -int ui_display_address(void); +void ui_menu_main(void); +int ui_display_review(bool is_blind_signed); +int ui_display_address_review(); +int ui_display_long_address_review(); +int ui_display_streaming_review(bool is_blind_signed); +int ui_display_long_address_review_with_tags(); +int ui_display_spinner(); +int ui_display_static_review(); +int ui_display_light_review(); diff --git a/src/ui/menu.h b/src/ui/menu.h index b8589f0..1a90403 100644 --- a/src/ui/menu.h +++ b/src/ui/menu.h @@ -7,13 +7,3 @@ #define LARGE_ICON C_app_nbgl_tests_64px #define LARGE_WARNING_ICON C_Warning_64px #endif - -/** - * Show main menu (ready screen, version, about, quit). - */ -void ui_menu_main(void); - -/** - * Show about submenu (copyright, date). - */ -void ui_menu_about(void); diff --git a/src/ui/menu_nbgl.c b/src/ui/menu_nbgl.c index fa352c2..3c14ca0 100644 --- a/src/ui/menu_nbgl.c +++ b/src/ui/menu_nbgl.c @@ -21,8 +21,9 @@ #include "os.h" #include "glyphs.h" #include "nbgl_use_case.h" +#include "display.h" -#include "../globals.h" +#include "globals.h" #include "menu.h" // ----------------------------------------------------------- @@ -37,9 +38,16 @@ void app_quit(void) { // ----------------------------------------------------------- // --------------------- SETTINGS MENU ----------------------- // ----------------------------------------------------------- -#define SETTING_INFO_NB 2 -static const char* const INFO_TYPES[SETTING_INFO_NB] = {"Version", "Developer"}; -static const char* const INFO_CONTENTS[SETTING_INFO_NB] = {APPVERSION, "Ledger"}; +#define SETTING_INFO_NB 4 +static const char* const INFO_TYPES[SETTING_INFO_NB] = {"Version", + "Developer", + "Dummy 1", + "Dummy 2"}; + +static const char* const INFO_CONTENTS[SETTING_INFO_NB] = {APPVERSION, + "Ledger", + "Dummy 1 information", + "Dummy 2 information"}; // settings switches definitions enum { DUMMY_SWITCH_1_TOKEN = FIRST_USER_TOKEN, DUMMY_SWITCH_2_TOKEN }; @@ -127,6 +135,7 @@ static void controls_callback(int token, uint8_t index, int page) { } } +static nbgl_homeAction_t homeAction; // home page definition void ui_menu_main(void) { // Initialize switches data @@ -146,13 +155,16 @@ void ui_menu_main(void) { switches[DUMMY_SWITCH_2_ID].tuneId = TUNE_TAP_CASUAL; #endif + homeAction.callback = (nbgl_callback_t) ui_display_address_review; + homeAction.icon = NULL; + homeAction.text = "Display flows"; nbgl_useCaseHomeAndSettings(APPNAME, &LARGE_ICON, NULL, INIT_HOME_PAGE, &settingContents, &infoList, - NULL, + &homeAction, app_quit); } diff --git a/src/ui/nbgl_display_address.c b/src/ui/nbgl_display_address.c index 1631871..56c305d 100644 --- a/src/ui/nbgl_display_address.c +++ b/src/ui/nbgl_display_address.c @@ -29,10 +29,10 @@ #include "display.h" #include "constants.h" -#include "../globals.h" -#include "../sw.h" -#include "action/validate.h" -#include "../menu.h" +#include "globals.h" +#include "sw.h" +#include "validate.h" +#include "menu.h" static void review_choice(bool confirm) { // Answer, display a status page and go back to main @@ -44,7 +44,7 @@ static void review_choice(bool confirm) { } } -int ui_display_address() { +int ui_display_address_review() { nbgl_useCaseAddressReview("0xABCDEF1234", NULL, &LARGE_ICON, @@ -54,4 +54,43 @@ int ui_display_address() { return 0; } +int ui_display_long_address_review() { + nbgl_useCaseAddressReview( + "5A8FgbMkmG2e3J41sBdjvjaBUyz8qHohsQcGtRf63qEUTMBvmA45fp" + "p5pSacMdSg7A3b71RejLzB8EkGbfjp5PELVHCRUaE", + NULL, + &LARGE_ICON, + "Verify NBT address", + NULL, + review_choice); + return 0; +} + +// 2 pairs of tag/value to display in second page +static nbgl_layoutTagValue_t pairs[2]; +static nbgl_layoutTagValueList_t pairList; + +int ui_display_long_address_review_with_tags() { + // Setup data to display + pairs[0].item = "Type address"; + pairs[0].value = "dummy type"; + pairs[1].item = "Sub address"; + pairs[1].value = "dummy sub address"; + + // Setup list + pairList.nbMaxLinesForValue = 0; + pairList.nbPairs = 2; + pairList.pairs = pairs; + + nbgl_useCaseAddressReview( + "5A8FgbMkmG2e3J41sBdjvjaBUyz8qHohsQcGtRf63qEUTMBvmA45fp" + "p5pSacMdSg7A3b71RejLzB8EkGbfjp5PELVHCRUaE", + &pairList, + &LARGE_ICON, + "Verify NBT address", + NULL, + review_choice); + return 0; +} + #endif diff --git a/src/ui/nbgl_display_spinner.c b/src/ui/nbgl_display_spinner.c new file mode 100644 index 0000000..092431e --- /dev/null +++ b/src/ui/nbgl_display_spinner.c @@ -0,0 +1,41 @@ +/***************************************************************************** + * 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 "globals.h" +#include "display.h" +#include "sw.h" + +int ui_display_spinner() { + G_ticker_counter = 40; + nbgl_useCaseSpinner("Processing..."); + + return 0; +} +int G_ticker_counter; +void app_ticker_event_callback(void) { + // use a counter to stop the spinner after a while + if (G_ticker_counter > 0 && --G_ticker_counter == 0) { + io_send_sw(SW_OK); + ui_menu_main(); + } +} + +#endif // HAVE_NBGL \ No newline at end of file diff --git a/src/ui/nbgl_display_transaction.c b/src/ui/nbgl_display_transaction.c index 547d332..56a661d 100755 --- a/src/ui/nbgl_display_transaction.c +++ b/src/ui/nbgl_display_transaction.c @@ -30,17 +30,17 @@ #include "display.h" #include "constants.h" -#include "../globals.h" -#include "../sw.h" -#include "action/validate.h" -#include "../menu.h" +#include "globals.h" +#include "sw.h" +#include "validate.h" +#include "menu.h" // 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[2]; +static nbgl_layoutTagValue_t pairs[3]; static nbgl_layoutTagValueList_t pairList; // called when long press button on 3rd page is long-touched or when reject footer is touched @@ -58,12 +58,13 @@ static void review_choice(bool confirm) { // - Check if the app is in the right state for transaction review // - Format the amount and address strings in g_amount and g_address buffers // - Display the first screen of the transaction review -int ui_display_transaction() { +// - Display a warning if the transaction is blind-signed +int ui_display_review(bool is_blind_signed) { // 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_amount), "0x1234567890"); + snprintf(g_address, sizeof(g_address), "0x1234567890"); // Setup data to display pairs[0].item = "Amount"; @@ -76,14 +77,98 @@ int ui_display_transaction() { pairList.nbPairs = 2; pairList.pairs = pairs; - // Start review - nbgl_useCaseReview(TYPE_TRANSACTION, - &pairList, - &LARGE_ICON, - "Review transaction\nto send NBT", - NULL, - "Sign transaction\nto send NBT", - review_choice); + if (is_blind_signed) { + // Start blind-signing review flow + nbgl_useCaseReviewBlindSigning(TYPE_TRANSACTION, + &pairList, + &LARGE_ICON, + "Review transaction\nto send NBT", + NULL, + "Sign transaction\nto send NBT", + NULL, + review_choice); + } else { + // Start review flow + nbgl_useCaseReview(TYPE_TRANSACTION, + &pairList, + &LARGE_ICON, + "Review transaction\nto send NBT", + NULL, + "Sign transaction\nto send NBT", + review_choice); + } + + return 0; +} + +// used to simulate several streamed APDUs +static uint8_t streaming_counter; +static char buffer[10]; +static bool more_data_to_send() { + memset(buffer, 0, sizeof(buffer)); + snprintf(buffer, sizeof(buffer), "NBT %u", 10 * streaming_counter); + + // Setup data to display + pairs[0].item = "Amount"; + pairs[0].value = buffer; + pairs[1].item = "Address"; + pairs[1].value = "0x1234567890"; + pairs[2].item = "Long text"; + pairs[2].value = + "Very long text to test the more feature of the screen\n" + "Very long text to test the more feature of the screen\n" + "Very long text to test the more feature of the screen\n" + "Very long text to test the more feature of the screen\n" + "Very long text to test the more feature of the screen\n" + "Very long text to test the more feature of the screen\n"; + + // Setup list + pairList.nbMaxLinesForValue = 0; + // add a 3rd pair with a long text to test the more feature (for the last screen) + if (streaming_counter == 2) { + pairList.nbPairs = 3; + } else { + pairList.nbPairs = 2; + } + pairList.pairs = pairs; + streaming_counter--; + + // stop streaming when counter is 0 (all APDUs received) + return streaming_counter > 0; +} + +static void onTransactionContinue(bool askMore) { + if (askMore) { + if (more_data_to_send()) { + nbgl_useCaseReviewStreamingContinue(&pairList, onTransactionContinue); + } else { + nbgl_useCaseReviewStreamingFinish("Sign transaction\nto send NBT", review_choice); + } + } else { + review_choice(false); + } +} + +int ui_display_streaming_review(bool is_blind_signed) { + // streaming counter initialization + streaming_counter = 4; + + if (is_blind_signed) { + // Start streaming blind-signing review flow + nbgl_useCaseReviewStreamingBlindSigningStart(TYPE_TRANSACTION, + &LARGE_ICON, + "Review transaction\nto send NBT", + NULL, + onTransactionContinue); + } else { + // Start streaming review flow + nbgl_useCaseReviewStreamingStart(TYPE_TRANSACTION, + &LARGE_ICON, + "Review transaction\nto send NBT", + NULL, + onTransactionContinue); + } + return 0; } diff --git a/src/ui/nbgl_display_transaction_legacy.c b/src/ui/nbgl_display_transaction_legacy.c new file mode 100644 index 0000000..7de94c6 --- /dev/null +++ b/src/ui/nbgl_display_transaction_legacy.c @@ -0,0 +1,131 @@ +/***************************************************************************** + * 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 // bool +#include // memset + +#include "os.h" +#include "glyphs.h" +#include "nbgl_use_case.h" + +#include "globals.h" +#include "sw.h" +#include "validate.h" +#include "display.h" +#include "menu.h" + +// 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; + +// called when long press button on 3rd page is long-touched or when reject footer is touched +static void review_choice(bool confirm) { + // Answer, display a status page and go back to main + validate_transaction(confirm); + if (confirm) { + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_SIGNED, ui_menu_main); + } else { + nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, ui_menu_main); + } +} + +static void reject_callback(void) { + review_choice(false); +} + +void continue_callback() { + // 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"); + + // Setup data to display + pairs[0].item = "Amount"; + pairs[0].value = g_amount; + pairs[1].item = "Address"; + pairs[1].value = g_address; + + // Setup list + pairList.nbMaxLinesForValue = 0; + 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"; + + nbgl_useCaseStaticReview(&pairList, &infoLongPress, "Reject", review_choice); +} + +// start a static review flow +int ui_display_static_review() { + nbgl_useCaseReviewStart(&LARGE_ICON, + "Review transaction\nto send NBT", + NULL, + "Reject", + continue_callback, + reject_callback); + + return 0; +} + +int ui_display_light_review() { + // 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"); + + // Setup data to display + pairs[0].item = "Amount"; + pairs[0].value = g_amount; + pairs[1].item = "Address"; + pairs[1].value = g_address; + + // Setup list + pairList.nbMaxLinesForValue = 0; + 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, + "Review transaction\nto send NBT", + NULL, + "Sign transaction\nto send NBT", + review_choice); + return 0; +} + +#endif diff --git a/tests/application_client/boilerplate_command_sender.py b/tests/application_client/boilerplate_command_sender.py deleted file mode 100644 index 4d1a445..0000000 --- a/tests/application_client/boilerplate_command_sender.py +++ /dev/null @@ -1,99 +0,0 @@ -from enum import IntEnum -from typing import Generator, List, Optional -from contextlib import contextmanager - -from ragger.backend.interface import BackendInterface, RAPDU - -MAX_APDU_LEN: int = 255 - -CLA: int = 0xE0 - -class P1(IntEnum): - # Parameter 1 for first APDU number. - P1_START = 0x00 - # Parameter 1 for maximum APDU number. - P1_MAX = 0x03 - # Parameter 1 for screen confirmation for GET_PUBLIC_KEY. - P1_CONFIRM = 0x01 - -class P2(IntEnum): - # Parameter 2 for last APDU to receive. - P2_LAST = 0x00 - # Parameter 2 for more APDU to receive. - P2_MORE = 0x80 - -class InsType(IntEnum): - GET_VERSION = 0x03 - GET_APP_NAME = 0x04 - TEST_REVIEW1 = 0x05 - TEST_REVIEW2 = 0x06 - -class Errors(IntEnum): - SW_DENY = 0x6985 - SW_WRONG_P1P2 = 0x6A86 - SW_WRONG_DATA_LENGTH = 0x6A87 - SW_INS_NOT_SUPPORTED = 0x6D00 - SW_CLA_NOT_SUPPORTED = 0x6E00 - SW_WRONG_RESPONSE_LENGTH = 0xB000 - SW_DISPLAY_BIP32_PATH_FAIL = 0xB001 - SW_DISPLAY_ADDRESS_FAIL = 0xB002 - SW_DISPLAY_AMOUNT_FAIL = 0xB003 - SW_WRONG_TX_LENGTH = 0xB004 - SW_TX_PARSING_FAIL = 0xB005 - SW_TX_HASH_FAIL = 0xB006 - SW_BAD_STATE = 0xB007 - SW_SIGNATURE_FAIL = 0xB008 - - -def split_message(message: bytes, max_size: int) -> List[bytes]: - return [message[x:x + max_size] for x in range(0, len(message), max_size)] - - -class BoilerplateCommandSender: - def __init__(self, backend: BackendInterface) -> None: - self.backend = backend - - - def get_app_and_version(self) -> RAPDU: - return self.backend.exchange(cla=0xB0, # specific CLA for BOLOS - ins=0x01, # specific INS for get_app_and_version - p1=P1.P1_START, - p2=P2.P2_LAST, - data=b"") - - - def get_version(self) -> RAPDU: - return self.backend.exchange(cla=CLA, - ins=InsType.GET_VERSION, - p1=P1.P1_START, - p2=P2.P2_LAST, - data=b"") - - - def get_app_name(self) -> RAPDU: - return self.backend.exchange(cla=CLA, - ins=InsType.GET_APP_NAME, - p1=P1.P1_START, - p2=P2.P2_LAST, - data=b"") - - @contextmanager - def test_review1(self,) -> Generator[None, None, None]: - with self.backend.exchange_async(cla=CLA, - ins=InsType.TEST_REVIEW1, - p1=P1.P1_START, - p2=P2.P2_LAST, - data=b"") as response: - yield response - - @contextmanager - def test_review2(self,) -> Generator[None, None, None]: - with self.backend.exchange_async(cla=CLA, - ins=InsType.TEST_REVIEW2, - p1=P1.P1_START, - p2=P2.P2_LAST, - data=b"") as response: - yield response - - def get_async_response(self) -> Optional[RAPDU]: - return self.backend.last_async_response diff --git a/tests/application_client/nbgl_command_sender.py b/tests/application_client/nbgl_command_sender.py new file mode 100644 index 0000000..3502354 --- /dev/null +++ b/tests/application_client/nbgl_command_sender.py @@ -0,0 +1,178 @@ +from enum import IntEnum +from typing import Generator, List, Optional +from contextlib import contextmanager + +from ragger.backend.interface import BackendInterface, RAPDU + +MAX_APDU_LEN: int = 255 + +CLA: int = 0xE0 + +class P1(IntEnum): + # Parameter 1 for first APDU number. + P1_START = 0x00 + # Parameter 1 for maximum APDU number. + P1_MAX = 0x03 + # Parameter 1 for screen confirmation for GET_PUBLIC_KEY. + P1_CONFIRM = 0x01 + +class P2(IntEnum): + # Parameter 2 for last APDU to receive. + P2_LAST = 0x00 + # Parameter 2 for more APDU to receive. + P2_MORE = 0x80 + +class InsType(IntEnum): + GET_VERSION = 0x03 + GET_APP_NAME = 0x04 + TEST_USE_CASE_REVIEW = 0x05 + TEST_USE_CASE_REVIEW_BLIND_SIGNING = 0x06 + TEST_USE_CASE_STREAMING_REVIEW = 0x07 + TEST_USE_CASE_STREAMING_REVIEW_BLIND_SIGNING = 0x08 + TEST_USE_CASE_ADDRESS_REVIEW = 0x09 + TEST_SPINNER = 0x0A + TEST_USE_CASE_STATIC_REVIEW = 0x0B + TEST_USE_CASE_LIGHT_REVIEW = 0x0C + +class Errors(IntEnum): + SW_DENY = 0x6985 + SW_WRONG_P1P2 = 0x6A86 + SW_WRONG_DATA_LENGTH = 0x6A87 + SW_INS_NOT_SUPPORTED = 0x6D00 + SW_CLA_NOT_SUPPORTED = 0x6E00 + SW_WRONG_RESPONSE_LENGTH = 0xB000 + SW_DISPLAY_BIP32_PATH_FAIL = 0xB001 + SW_DISPLAY_ADDRESS_FAIL = 0xB002 + SW_DISPLAY_AMOUNT_FAIL = 0xB003 + SW_WRONG_TX_LENGTH = 0xB004 + SW_TX_PARSING_FAIL = 0xB005 + SW_TX_HASH_FAIL = 0xB006 + SW_BAD_STATE = 0xB007 + SW_SIGNATURE_FAIL = 0xB008 + +SW_OK: int = 0x9000 + +def split_message(message: bytes, max_size: int) -> List[bytes]: + return [message[x:x + max_size] for x in range(0, len(message), max_size)] + + +class NBGLCommandSender: + def __init__(self, backend: BackendInterface) -> None: + self.backend = backend + + + def get_app_and_version(self) -> RAPDU: + return self.backend.exchange(cla=0xB0, # specific CLA for BOLOS + ins=0x01, # specific INS for get_app_and_version + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") + + + def get_version(self) -> RAPDU: + return self.backend.exchange(cla=CLA, + ins=InsType.GET_VERSION, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") + + + def get_app_name(self) -> RAPDU: + return self.backend.exchange(cla=CLA, + ins=InsType.GET_APP_NAME, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") + + @contextmanager + def test_spinner(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_SPINNER, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_REVIEW, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_blind_signed_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_REVIEW_BLIND_SIGNING, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_streaming_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_STREAMING_REVIEW, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_blind_signed_streaming_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_STREAMING_REVIEW_BLIND_SIGNING, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_address_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_ADDRESS_REVIEW, + p1=0x00, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_long_address_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_ADDRESS_REVIEW, + p1=0x01, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_long_address_review_with_tags(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_ADDRESS_REVIEW, + p1=0x02, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_static_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_STATIC_REVIEW, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + @contextmanager + def test_use_case_light_review(self) -> Generator[None, None, None]: + with self.backend.exchange_async(cla=CLA, + ins=InsType.TEST_USE_CASE_LIGHT_REVIEW, + p1=P1.P1_START, + p2=P2.P2_LAST, + data=b"") as response: + yield response + + def get_async_response(self) -> Optional[RAPDU]: + return self.backend.last_async_response diff --git a/tests/application_client/boilerplate_response_unpacker.py b/tests/application_client/nbgl_response_unpacker.py similarity index 100% rename from tests/application_client/boilerplate_response_unpacker.py rename to tests/application_client/nbgl_response_unpacker.py diff --git a/tests/application_client/boilerplate_utils.py b/tests/application_client/nbgl_utils.py similarity index 100% rename from tests/application_client/boilerplate_utils.py rename to tests/application_client/nbgl_utils.py diff --git a/tests/snapshots/flex/test_app_mainmenu/00000.png b/tests/snapshots/flex/test_app_mainmenu/00000.png index b69b35b..ff2250f 100644 Binary files a/tests/snapshots/flex/test_app_mainmenu/00000.png and b/tests/snapshots/flex/test_app_mainmenu/00000.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00001.png b/tests/snapshots/flex/test_app_mainmenu/00001.png index 66fa19c..60e9c64 100644 Binary files a/tests/snapshots/flex/test_app_mainmenu/00001.png and b/tests/snapshots/flex/test_app_mainmenu/00001.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00002.png b/tests/snapshots/flex/test_app_mainmenu/00002.png index 0316347..a5cdb93 100644 Binary files a/tests/snapshots/flex/test_app_mainmenu/00002.png and b/tests/snapshots/flex/test_app_mainmenu/00002.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00004.png b/tests/snapshots/flex/test_app_mainmenu/00004.png index fb466d4..92b387f 100644 Binary files a/tests/snapshots/flex/test_app_mainmenu/00004.png and b/tests/snapshots/flex/test_app_mainmenu/00004.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00005.png b/tests/snapshots/flex/test_app_mainmenu/00005.png index 0316347..a5cdb93 100644 Binary files a/tests/snapshots/flex/test_app_mainmenu/00005.png and b/tests/snapshots/flex/test_app_mainmenu/00005.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00006.png b/tests/snapshots/flex/test_app_mainmenu/00006.png index af25584..3980c22 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_app_mainmenu/00007.png b/tests/snapshots/flex/test_app_mainmenu/00007.png index b69b35b..f2db3e0 100644 Binary files a/tests/snapshots/flex/test_app_mainmenu/00007.png and b/tests/snapshots/flex/test_app_mainmenu/00007.png differ diff --git a/tests/snapshots/flex/test_app_mainmenu/00008.png b/tests/snapshots/flex/test_app_mainmenu/00008.png new file mode 100644 index 0000000..86efd36 Binary files /dev/null and b/tests/snapshots/flex/test_app_mainmenu/00008.png differ diff --git a/tests/snapshots/flex/test_review1_accepted/00000.png b/tests/snapshots/flex/test_review1_accepted/00000.png deleted file mode 100644 index 42e34e5..0000000 Binary files a/tests/snapshots/flex/test_review1_accepted/00000.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review1_accepted/00001.png b/tests/snapshots/flex/test_review1_accepted/00001.png deleted file mode 100644 index bdaaa85..0000000 Binary files a/tests/snapshots/flex/test_review1_accepted/00001.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review1_accepted/00002.png b/tests/snapshots/flex/test_review1_accepted/00002.png deleted file mode 100644 index 937acee..0000000 Binary files a/tests/snapshots/flex/test_review1_accepted/00002.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review1_accepted/00004.png b/tests/snapshots/flex/test_review1_accepted/00004.png deleted file mode 100644 index b69b35b..0000000 Binary files a/tests/snapshots/flex/test_review1_accepted/00004.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review1_refused/00000.png b/tests/snapshots/flex/test_review1_refused/00000.png deleted file mode 100644 index 42e34e5..0000000 Binary files a/tests/snapshots/flex/test_review1_refused/00000.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review1_refused/00001.png b/tests/snapshots/flex/test_review1_refused/00001.png deleted file mode 100644 index bdaaa85..0000000 Binary files a/tests/snapshots/flex/test_review1_refused/00001.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review1_refused/00002.png b/tests/snapshots/flex/test_review1_refused/00002.png deleted file mode 100644 index 937acee..0000000 Binary files a/tests/snapshots/flex/test_review1_refused/00002.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review1_refused/00005.png b/tests/snapshots/flex/test_review1_refused/00005.png deleted file mode 100644 index b69b35b..0000000 Binary files a/tests/snapshots/flex/test_review1_refused/00005.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review2_accepted/00003.png b/tests/snapshots/flex/test_review2_accepted/00003.png deleted file mode 100644 index b69b35b..0000000 Binary files a/tests/snapshots/flex/test_review2_accepted/00003.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review2_refused/00000.png b/tests/snapshots/flex/test_review2_refused/00000.png deleted file mode 100644 index 6c72a1c..0000000 Binary files a/tests/snapshots/flex/test_review2_refused/00000.png and /dev/null differ diff --git a/tests/snapshots/flex/test_review2_refused/00003.png b/tests/snapshots/flex/test_review2_refused/00003.png deleted file mode 100644 index b69b35b..0000000 Binary files a/tests/snapshots/flex/test_review2_refused/00003.png and /dev/null differ diff --git a/tests/snapshots/flex/test_spinner/00000.png b/tests/snapshots/flex/test_spinner/00000.png new file mode 100644 index 0000000..c86746c Binary files /dev/null and b/tests/snapshots/flex/test_spinner/00000.png differ diff --git a/tests/snapshots/flex/test_spinner/00001.png b/tests/snapshots/flex/test_spinner/00001.png new file mode 100644 index 0000000..11382c6 Binary files /dev/null and b/tests/snapshots/flex/test_spinner/00001.png differ diff --git a/tests/snapshots/flex/test_spinner/00002.png b/tests/snapshots/flex/test_spinner/00002.png new file mode 100644 index 0000000..6f2c436 Binary files /dev/null and b/tests/snapshots/flex/test_spinner/00002.png differ diff --git a/tests/snapshots/flex/test_spinner/00003.png b/tests/snapshots/flex/test_spinner/00003.png new file mode 100644 index 0000000..6b0c8f1 Binary files /dev/null and b/tests/snapshots/flex/test_spinner/00003.png differ diff --git a/tests/snapshots/flex/test_spinner/00004.png b/tests/snapshots/flex/test_spinner/00004.png new file mode 100644 index 0000000..c86746c Binary files /dev/null and b/tests/snapshots/flex/test_spinner/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_address_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_address_review_accepted/00000.png new file mode 100644 index 0000000..94534c9 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_address_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_review2_accepted/00001.png b/tests/snapshots/flex/test_use_case_address_review_accepted/00001.png similarity index 100% rename from tests/snapshots/flex/test_review2_accepted/00001.png rename to tests/snapshots/flex/test_use_case_address_review_accepted/00001.png diff --git a/tests/snapshots/flex/test_use_case_address_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_address_review_accepted/00002.png new file mode 100644 index 0000000..e0fd46f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_address_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_review2_refused/00001.png b/tests/snapshots/flex/test_use_case_address_review_accepted/00003.png similarity index 100% rename from tests/snapshots/flex/test_review2_refused/00001.png rename to tests/snapshots/flex/test_use_case_address_review_accepted/00003.png diff --git a/tests/snapshots/flex/test_review2_accepted/00002.png b/tests/snapshots/flex/test_use_case_address_review_accepted/00004.png similarity index 100% rename from tests/snapshots/flex/test_review2_accepted/00002.png rename to tests/snapshots/flex/test_use_case_address_review_accepted/00004.png diff --git a/tests/snapshots/flex/test_use_case_address_review_accepted/00005.png b/tests/snapshots/flex/test_use_case_address_review_accepted/00005.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_address_review_accepted/00005.png differ diff --git a/tests/snapshots/flex/test_review2_accepted/00000.png b/tests/snapshots/flex/test_use_case_address_review_refused/00000.png similarity index 100% rename from tests/snapshots/flex/test_review2_accepted/00000.png rename to tests/snapshots/flex/test_use_case_address_review_refused/00000.png 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 new file mode 100644 index 0000000..03dea54 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_address_review_refused/00001.png differ diff --git a/tests/snapshots/flex/test_review2_refused/00002.png b/tests/snapshots/flex/test_use_case_address_review_refused/00002.png similarity index 100% rename from tests/snapshots/flex/test_review2_refused/00002.png rename to tests/snapshots/flex/test_use_case_address_review_refused/00002.png 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 new file mode 100644 index 0000000..fbd5fff Binary files /dev/null and b/tests/snapshots/flex/test_use_case_address_review_refused/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00000.png new file mode 100644 index 0000000..3c1b1a7 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00001.png b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00001.png new file mode 100644 index 0000000..0355fe2 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00002.png new file mode 100644 index 0000000..c64d5da Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_review1_accepted/00003.png b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00003.png similarity index 100% rename from tests/snapshots/flex/test_review1_accepted/00003.png rename to tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00003.png diff --git a/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00004.png b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00004.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_review_accepted/00004.png 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 new file mode 100644 index 0000000..acbb161 Binary files /dev/null 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 new file mode 100644 index 0000000..acbb161 Binary files /dev/null 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/00001.png b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00001.png new file mode 100644 index 0000000..3c1b1a7 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00001.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 new file mode 100644 index 0000000..fb64696 Binary files /dev/null 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_review_display_warning/00003.png b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00003.png new file mode 100644 index 0000000..3c1b1a7 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00003.png differ diff --git a/tests/snapshots/flex/test_review1_refused/00003.png b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00004.png similarity index 100% rename from tests/snapshots/flex/test_review1_refused/00003.png rename to tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00004.png diff --git a/tests/snapshots/flex/test_review1_refused/00004.png b/tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00005.png similarity index 100% rename from tests/snapshots/flex/test_review1_refused/00004.png rename to tests/snapshots/flex/test_use_case_blind_signed_review_display_warning/00005.png diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00000.png new file mode 100644 index 0000000..267b78c Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00001.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00001.png new file mode 100644 index 0000000..ce76b0f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00002.png new file mode 100644 index 0000000..1270720 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00003.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00003.png new file mode 100644 index 0000000..c175b41 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00004.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00004.png new file mode 100644 index 0000000..4527955 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00005.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00005.png new file mode 100644 index 0000000..c9b613d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00006.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00006.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00006.png differ diff --git a/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00007.png b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00007.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_blind_signed_streaming_review_accepted/00007.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 new file mode 100644 index 0000000..acbb161 Binary files /dev/null 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_light_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_light_review_accepted/00000.png new file mode 100644 index 0000000..a1e66ea Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_accepted/00001.png b/tests/snapshots/flex/test_use_case_light_review_accepted/00001.png new file mode 100644 index 0000000..0355fe2 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_light_review_accepted/00002.png new file mode 100644 index 0000000..642982d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_accepted/00003.png b/tests/snapshots/flex/test_use_case_light_review_accepted/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_accepted/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_refused/00000.png b/tests/snapshots/flex/test_use_case_light_review_refused/00000.png new file mode 100644 index 0000000..a1e66ea Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_refused/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_refused/00001.png b/tests/snapshots/flex/test_use_case_light_review_refused/00001.png new file mode 100644 index 0000000..0355fe2 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_refused/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_refused/00002.png b/tests/snapshots/flex/test_use_case_light_review_refused/00002.png new file mode 100644 index 0000000..642982d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_refused/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_refused/00003.png b/tests/snapshots/flex/test_use_case_light_review_refused/00003.png new file mode 100644 index 0000000..6a11e11 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_refused/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_light_review_refused/00004.png b/tests/snapshots/flex/test_use_case_light_review_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_light_review_refused/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00000.png new file mode 100644 index 0000000..94534c9 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted/00001.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00001.png new file mode 100644 index 0000000..88095a3 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00002.png new file mode 100644 index 0000000..fcc4b51 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted/00003.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00003.png new file mode 100644 index 0000000..88095a3 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted/00004.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00004.png new file mode 100644 index 0000000..4321e60 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted/00005.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00005.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted/00005.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00000.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00000.png new file mode 100644 index 0000000..d6e034a Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00001.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00001.png new file mode 100644 index 0000000..63bc86a Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00002.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00002.png new file mode 100644 index 0000000..fcc4b51 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00003.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00003.png new file mode 100644 index 0000000..63bc86a Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00004.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00004.png new file mode 100644 index 0000000..eb1eec4 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00005.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00005.png new file mode 100644 index 0000000..4321e60 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00005.png differ diff --git a/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00006.png b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00006.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_long_address_review_accepted_with_tags/00006.png differ diff --git a/tests/snapshots/flex/test_use_case_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_review_accepted/00000.png new file mode 100644 index 0000000..a1e66ea Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_review_accepted/00001.png b/tests/snapshots/flex/test_use_case_review_accepted/00001.png new file mode 100644 index 0000000..0355fe2 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_review_accepted/00002.png new file mode 100644 index 0000000..2624563 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_review_accepted/00003.png b/tests/snapshots/flex/test_use_case_review_accepted/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_accepted/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_review_accepted/00004.png b/tests/snapshots/flex/test_use_case_review_accepted/00004.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_accepted/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_review_refused/00000.png b/tests/snapshots/flex/test_use_case_review_refused/00000.png new file mode 100644 index 0000000..a1e66ea Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_refused/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_review_refused/00001.png b/tests/snapshots/flex/test_use_case_review_refused/00001.png new file mode 100644 index 0000000..0355fe2 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_refused/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_review_refused/00002.png b/tests/snapshots/flex/test_use_case_review_refused/00002.png new file mode 100644 index 0000000..2624563 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_refused/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_review_refused/00003.png b/tests/snapshots/flex/test_use_case_review_refused/00003.png new file mode 100644 index 0000000..6a11e11 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_refused/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_review_refused/00004.png b/tests/snapshots/flex/test_use_case_review_refused/00004.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_refused/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_review_refused/00005.png b/tests/snapshots/flex/test_use_case_review_refused/00005.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_review_refused/00005.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_static_review_accepted/00000.png new file mode 100644 index 0000000..d03323a Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_accepted/00001.png b/tests/snapshots/flex/test_use_case_static_review_accepted/00001.png new file mode 100644 index 0000000..f4cdf7d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_static_review_accepted/00002.png new file mode 100644 index 0000000..336b995 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_accepted/00003.png b/tests/snapshots/flex/test_use_case_static_review_accepted/00003.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_accepted/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_accepted/00004.png b/tests/snapshots/flex/test_use_case_static_review_accepted/00004.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_accepted/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_refused/00000.png b/tests/snapshots/flex/test_use_case_static_review_refused/00000.png new file mode 100644 index 0000000..d03323a Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_refused/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_refused/00001.png b/tests/snapshots/flex/test_use_case_static_review_refused/00001.png new file mode 100644 index 0000000..f4cdf7d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_refused/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_refused/00002.png b/tests/snapshots/flex/test_use_case_static_review_refused/00002.png new file mode 100644 index 0000000..336b995 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_refused/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_static_review_refused/00003.png b/tests/snapshots/flex/test_use_case_static_review_refused/00003.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_static_review_refused/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00000.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00000.png new file mode 100644 index 0000000..a78445e Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00001.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00001.png new file mode 100644 index 0000000..ce76b0f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00002.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00002.png new file mode 100644 index 0000000..1270720 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00003.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00003.png new file mode 100644 index 0000000..c175b41 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00004.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00004.png new file mode 100644 index 0000000..4527955 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00005.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00005.png new file mode 100644 index 0000000..dc7303c Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00006.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00006.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00006.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted/00007.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00007.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted/00007.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00000.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00000.png new file mode 100644 index 0000000..a78445e Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00001.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00001.png new file mode 100644 index 0000000..ce76b0f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00002.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00002.png new file mode 100644 index 0000000..1270720 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00003.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00003.png new file mode 100644 index 0000000..c175b41 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00004.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00004.png new file mode 100644 index 0000000..4527955 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00005.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00005.png new file mode 100644 index 0000000..5d20d9f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00005.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00006.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00006.png new file mode 100644 index 0000000..a8d5a1a Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00006.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00007.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00007.png new file mode 100644 index 0000000..4527955 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00007.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00008.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00008.png new file mode 100644 index 0000000..dc7303c Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00008.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00009.png b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00009.png new file mode 100644 index 0000000..be51a9d Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_accepted_with_more/00009.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00000.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00000.png new file mode 100644 index 0000000..a78445e Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00000.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00001.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00001.png new file mode 100644 index 0000000..ce76b0f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00001.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00002.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00002.png new file mode 100644 index 0000000..1270720 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00002.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00003.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00003.png new file mode 100644 index 0000000..c175b41 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00003.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00004.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00004.png new file mode 100644 index 0000000..4527955 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00004.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00005.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00005.png new file mode 100644 index 0000000..dc7303c Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00005.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00006.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00006.png new file mode 100644 index 0000000..6a11e11 Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00006.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00007.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00007.png new file mode 100644 index 0000000..6bbdf2f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00007.png differ diff --git a/tests/snapshots/flex/test_use_case_streaming_review_refused/00008.png b/tests/snapshots/flex/test_use_case_streaming_review_refused/00008.png new file mode 100644 index 0000000..ff2250f Binary files /dev/null and b/tests/snapshots/flex/test_use_case_streaming_review_refused/00008.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00000.png b/tests/snapshots/stax/test_app_mainmenu/00000.png index d5d110c..1afa675 100644 Binary files a/tests/snapshots/stax/test_app_mainmenu/00000.png and b/tests/snapshots/stax/test_app_mainmenu/00000.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00001.png b/tests/snapshots/stax/test_app_mainmenu/00001.png index 51be7a3..9396de3 100644 Binary files a/tests/snapshots/stax/test_app_mainmenu/00001.png and b/tests/snapshots/stax/test_app_mainmenu/00001.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00002.png b/tests/snapshots/stax/test_app_mainmenu/00002.png index d2bd85d..7655d91 100644 Binary files a/tests/snapshots/stax/test_app_mainmenu/00002.png and b/tests/snapshots/stax/test_app_mainmenu/00002.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00004.png b/tests/snapshots/stax/test_app_mainmenu/00004.png index d639a9f..be23cf5 100644 Binary files a/tests/snapshots/stax/test_app_mainmenu/00004.png and b/tests/snapshots/stax/test_app_mainmenu/00004.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00005.png b/tests/snapshots/stax/test_app_mainmenu/00005.png index d2bd85d..7655d91 100644 Binary files a/tests/snapshots/stax/test_app_mainmenu/00005.png and b/tests/snapshots/stax/test_app_mainmenu/00005.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00006.png b/tests/snapshots/stax/test_app_mainmenu/00006.png index ebe1ca7..692a8f8 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_app_mainmenu/00007.png b/tests/snapshots/stax/test_app_mainmenu/00007.png index d5d110c..2686b0a 100644 Binary files a/tests/snapshots/stax/test_app_mainmenu/00007.png and b/tests/snapshots/stax/test_app_mainmenu/00007.png differ diff --git a/tests/snapshots/stax/test_app_mainmenu/00008.png b/tests/snapshots/stax/test_app_mainmenu/00008.png new file mode 100644 index 0000000..6b52ba7 Binary files /dev/null and b/tests/snapshots/stax/test_app_mainmenu/00008.png differ diff --git a/tests/snapshots/stax/test_review1_accepted/00000.png b/tests/snapshots/stax/test_review1_accepted/00000.png deleted file mode 100644 index 8cdf441..0000000 Binary files a/tests/snapshots/stax/test_review1_accepted/00000.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review1_accepted/00002.png b/tests/snapshots/stax/test_review1_accepted/00002.png deleted file mode 100644 index 0e95ebe..0000000 Binary files a/tests/snapshots/stax/test_review1_accepted/00002.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review1_accepted/00004.png b/tests/snapshots/stax/test_review1_accepted/00004.png deleted file mode 100644 index d5d110c..0000000 Binary files a/tests/snapshots/stax/test_review1_accepted/00004.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review1_refused/00000.png b/tests/snapshots/stax/test_review1_refused/00000.png deleted file mode 100644 index 8cdf441..0000000 Binary files a/tests/snapshots/stax/test_review1_refused/00000.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review1_refused/00002.png b/tests/snapshots/stax/test_review1_refused/00002.png deleted file mode 100644 index 0e95ebe..0000000 Binary files a/tests/snapshots/stax/test_review1_refused/00002.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review1_refused/00005.png b/tests/snapshots/stax/test_review1_refused/00005.png deleted file mode 100644 index d5d110c..0000000 Binary files a/tests/snapshots/stax/test_review1_refused/00005.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review2_accepted/00001.png b/tests/snapshots/stax/test_review2_accepted/00001.png deleted file mode 100644 index 352415b..0000000 Binary files a/tests/snapshots/stax/test_review2_accepted/00001.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review2_accepted/00003.png b/tests/snapshots/stax/test_review2_accepted/00003.png deleted file mode 100644 index d5d110c..0000000 Binary files a/tests/snapshots/stax/test_review2_accepted/00003.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review2_refused/00000.png b/tests/snapshots/stax/test_review2_refused/00000.png deleted file mode 100644 index 32fddd4..0000000 Binary files a/tests/snapshots/stax/test_review2_refused/00000.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review2_refused/00001.png b/tests/snapshots/stax/test_review2_refused/00001.png deleted file mode 100644 index 352415b..0000000 Binary files a/tests/snapshots/stax/test_review2_refused/00001.png and /dev/null differ diff --git a/tests/snapshots/stax/test_review2_refused/00003.png b/tests/snapshots/stax/test_review2_refused/00003.png deleted file mode 100644 index d5d110c..0000000 Binary files a/tests/snapshots/stax/test_review2_refused/00003.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_long_tx/00000.png b/tests/snapshots/stax/test_sign_tx_long_tx/00000.png deleted file mode 100644 index c813536..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_long_tx/00000.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_long_tx/00001.png b/tests/snapshots/stax/test_sign_tx_long_tx/00001.png deleted file mode 100644 index 039e9f7..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_long_tx/00001.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_long_tx/00002.png b/tests/snapshots/stax/test_sign_tx_long_tx/00002.png deleted file mode 100644 index bc8862f..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_long_tx/00002.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_long_tx/00004.png b/tests/snapshots/stax/test_sign_tx_long_tx/00004.png deleted file mode 100644 index 751fa6c..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_long_tx/00004.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_refused/00000.png b/tests/snapshots/stax/test_sign_tx_refused/00000.png deleted file mode 100644 index c813536..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_refused/00000.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_refused/00001.png b/tests/snapshots/stax/test_sign_tx_refused/00001.png deleted file mode 100644 index 039e9f7..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_refused/00001.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_refused/00002.png b/tests/snapshots/stax/test_sign_tx_refused/00002.png deleted file mode 100644 index bc8862f..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_refused/00002.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_refused/00005.png b/tests/snapshots/stax/test_sign_tx_refused/00005.png deleted file mode 100644 index 751fa6c..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_refused/00005.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_short_tx/00000.png b/tests/snapshots/stax/test_sign_tx_short_tx/00000.png deleted file mode 100644 index c813536..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_short_tx/00000.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_short_tx/00001.png b/tests/snapshots/stax/test_sign_tx_short_tx/00001.png deleted file mode 100644 index 039e9f7..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_short_tx/00001.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_short_tx/00002.png b/tests/snapshots/stax/test_sign_tx_short_tx/00002.png deleted file mode 100644 index bc8862f..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_short_tx/00002.png and /dev/null differ diff --git a/tests/snapshots/stax/test_sign_tx_short_tx/00004.png b/tests/snapshots/stax/test_sign_tx_short_tx/00004.png deleted file mode 100644 index 751fa6c..0000000 Binary files a/tests/snapshots/stax/test_sign_tx_short_tx/00004.png and /dev/null differ diff --git a/tests/snapshots/stax/test_spinner/00000.png b/tests/snapshots/stax/test_spinner/00000.png new file mode 100644 index 0000000..930851e Binary files /dev/null and b/tests/snapshots/stax/test_spinner/00000.png differ diff --git a/tests/snapshots/stax/test_spinner/00001.png b/tests/snapshots/stax/test_spinner/00001.png new file mode 100644 index 0000000..31c429c Binary files /dev/null and b/tests/snapshots/stax/test_spinner/00001.png differ diff --git a/tests/snapshots/stax/test_spinner/00002.png b/tests/snapshots/stax/test_spinner/00002.png new file mode 100644 index 0000000..f0d4dc6 Binary files /dev/null and b/tests/snapshots/stax/test_spinner/00002.png differ diff --git a/tests/snapshots/stax/test_spinner/00003.png b/tests/snapshots/stax/test_spinner/00003.png new file mode 100644 index 0000000..14cca40 Binary files /dev/null and b/tests/snapshots/stax/test_spinner/00003.png differ diff --git a/tests/snapshots/stax/test_spinner/00004.png b/tests/snapshots/stax/test_spinner/00004.png new file mode 100644 index 0000000..930851e Binary files /dev/null and b/tests/snapshots/stax/test_spinner/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_address_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_address_review_accepted/00000.png new file mode 100644 index 0000000..22b4aa5 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_address_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_address_review_accepted/00001.png b/tests/snapshots/stax/test_use_case_address_review_accepted/00001.png new file mode 100644 index 0000000..8769a3e Binary files /dev/null and b/tests/snapshots/stax/test_use_case_address_review_accepted/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_address_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_address_review_accepted/00002.png new file mode 100644 index 0000000..7fa023e Binary files /dev/null and b/tests/snapshots/stax/test_use_case_address_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_address_review_accepted/00003.png b/tests/snapshots/stax/test_use_case_address_review_accepted/00003.png new file mode 100644 index 0000000..8769a3e Binary files /dev/null and b/tests/snapshots/stax/test_use_case_address_review_accepted/00003.png differ diff --git a/tests/snapshots/stax/test_review2_accepted/00002.png b/tests/snapshots/stax/test_use_case_address_review_accepted/00004.png similarity index 100% rename from tests/snapshots/stax/test_review2_accepted/00002.png rename to tests/snapshots/stax/test_use_case_address_review_accepted/00004.png diff --git a/tests/snapshots/stax/test_use_case_address_review_accepted/00005.png b/tests/snapshots/stax/test_use_case_address_review_accepted/00005.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_address_review_accepted/00005.png differ diff --git a/tests/snapshots/stax/test_review2_accepted/00000.png b/tests/snapshots/stax/test_use_case_address_review_refused/00000.png similarity index 100% rename from tests/snapshots/stax/test_review2_accepted/00000.png rename to tests/snapshots/stax/test_use_case_address_review_refused/00000.png 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 new file mode 100644 index 0000000..8769a3e Binary files /dev/null and b/tests/snapshots/stax/test_use_case_address_review_refused/00001.png differ diff --git a/tests/snapshots/stax/test_review2_refused/00002.png b/tests/snapshots/stax/test_use_case_address_review_refused/00002.png similarity index 100% rename from tests/snapshots/stax/test_review2_refused/00002.png rename to tests/snapshots/stax/test_use_case_address_review_refused/00002.png 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 new file mode 100644 index 0000000..5050f35 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_address_review_refused/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00000.png new file mode 100644 index 0000000..3b6f92f Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_review1_accepted/00001.png b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00001.png similarity index 100% rename from tests/snapshots/stax/test_review1_accepted/00001.png rename to tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00001.png diff --git a/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00002.png new file mode 100644 index 0000000..df2a47f Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_review1_accepted/00003.png b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00003.png similarity index 100% rename from tests/snapshots/stax/test_review1_accepted/00003.png rename to tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00003.png diff --git a/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00004.png b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00004.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_review_accepted/00004.png 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 new file mode 100644 index 0000000..9696ae1 Binary files /dev/null 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 new file mode 100644 index 0000000..9696ae1 Binary files /dev/null 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/00001.png b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00001.png new file mode 100644 index 0000000..3b6f92f Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00001.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 new file mode 100644 index 0000000..ad1c9fe Binary files /dev/null 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_review_display_warning/00003.png b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00003.png new file mode 100644 index 0000000..3b6f92f Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00003.png differ diff --git a/tests/snapshots/stax/test_review1_refused/00003.png b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00004.png similarity index 100% rename from tests/snapshots/stax/test_review1_refused/00003.png rename to tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00004.png diff --git a/tests/snapshots/stax/test_review1_refused/00004.png b/tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00005.png similarity index 100% rename from tests/snapshots/stax/test_review1_refused/00004.png rename to tests/snapshots/stax/test_use_case_blind_signed_review_display_warning/00005.png diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00000.png new file mode 100644 index 0000000..f755079 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00001.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00001.png new file mode 100644 index 0000000..69f0c9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00002.png new file mode 100644 index 0000000..b159d1b Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00003.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00003.png new file mode 100644 index 0000000..512cd20 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00004.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00004.png new file mode 100644 index 0000000..dff1b9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00005.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00005.png new file mode 100644 index 0000000..4fb7818 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/stax/test_sign_tx_long_tx/00003.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00006.png similarity index 100% rename from tests/snapshots/stax/test_sign_tx_long_tx/00003.png rename to tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00006.png diff --git a/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00007.png b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00007.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_blind_signed_streaming_review_accepted/00007.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 new file mode 100644 index 0000000..9696ae1 Binary files /dev/null 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_light_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_light_review_accepted/00000.png new file mode 100644 index 0000000..0bc9984 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_light_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_review1_refused/00001.png b/tests/snapshots/stax/test_use_case_light_review_accepted/00001.png similarity index 100% rename from tests/snapshots/stax/test_review1_refused/00001.png rename to tests/snapshots/stax/test_use_case_light_review_accepted/00001.png diff --git a/tests/snapshots/stax/test_use_case_light_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_light_review_accepted/00002.png new file mode 100644 index 0000000..d910b02 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_light_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_sign_tx_short_tx/00003.png b/tests/snapshots/stax/test_use_case_light_review_accepted/00003.png similarity index 100% rename from tests/snapshots/stax/test_sign_tx_short_tx/00003.png rename to tests/snapshots/stax/test_use_case_light_review_accepted/00003.png diff --git a/tests/snapshots/stax/test_use_case_light_review_refused/00000.png b/tests/snapshots/stax/test_use_case_light_review_refused/00000.png new file mode 100644 index 0000000..0bc9984 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_light_review_refused/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_light_review_refused/00001.png b/tests/snapshots/stax/test_use_case_light_review_refused/00001.png new file mode 100644 index 0000000..53a9fa1 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_light_review_refused/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_light_review_refused/00002.png b/tests/snapshots/stax/test_use_case_light_review_refused/00002.png new file mode 100644 index 0000000..d910b02 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_light_review_refused/00002.png differ diff --git a/tests/snapshots/stax/test_sign_tx_refused/00003.png b/tests/snapshots/stax/test_use_case_light_review_refused/00003.png similarity index 100% rename from tests/snapshots/stax/test_sign_tx_refused/00003.png rename to tests/snapshots/stax/test_use_case_light_review_refused/00003.png diff --git a/tests/snapshots/stax/test_sign_tx_refused/00004.png b/tests/snapshots/stax/test_use_case_light_review_refused/00004.png similarity index 100% rename from tests/snapshots/stax/test_sign_tx_refused/00004.png rename to tests/snapshots/stax/test_use_case_light_review_refused/00004.png diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00000.png new file mode 100644 index 0000000..22b4aa5 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted/00001.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00001.png new file mode 100644 index 0000000..8be1fe4 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00002.png new file mode 100644 index 0000000..4ad7883 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted/00003.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00003.png new file mode 100644 index 0000000..8be1fe4 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted/00004.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00004.png new file mode 100644 index 0000000..7a49478 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted/00005.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00005.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted/00005.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00000.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00000.png new file mode 100644 index 0000000..1a4dbc6 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00001.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00001.png new file mode 100644 index 0000000..799e6dc Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00002.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00002.png new file mode 100644 index 0000000..4ad7883 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00003.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00003.png new file mode 100644 index 0000000..799e6dc Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00004.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00004.png new file mode 100644 index 0000000..693c65e Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00005.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00005.png new file mode 100644 index 0000000..7a49478 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00005.png differ diff --git a/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00006.png b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00006.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_long_address_review_accepted_with_tags/00006.png differ diff --git a/tests/snapshots/stax/test_use_case_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_review_accepted/00000.png new file mode 100644 index 0000000..0bc9984 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_review_accepted/00001.png b/tests/snapshots/stax/test_use_case_review_accepted/00001.png new file mode 100644 index 0000000..53a9fa1 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_accepted/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_review_accepted/00002.png new file mode 100644 index 0000000..145126d Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_review_accepted/00003.png b/tests/snapshots/stax/test_use_case_review_accepted/00003.png new file mode 100644 index 0000000..392165d Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_accepted/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_review_accepted/00004.png b/tests/snapshots/stax/test_use_case_review_accepted/00004.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_accepted/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_review_refused/00000.png b/tests/snapshots/stax/test_use_case_review_refused/00000.png new file mode 100644 index 0000000..0bc9984 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_refused/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_review_refused/00001.png b/tests/snapshots/stax/test_use_case_review_refused/00001.png new file mode 100644 index 0000000..53a9fa1 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_refused/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_review_refused/00002.png b/tests/snapshots/stax/test_use_case_review_refused/00002.png new file mode 100644 index 0000000..145126d Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_refused/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_review_refused/00003.png b/tests/snapshots/stax/test_use_case_review_refused/00003.png new file mode 100644 index 0000000..abc9677 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_refused/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_review_refused/00004.png b/tests/snapshots/stax/test_use_case_review_refused/00004.png new file mode 100644 index 0000000..2b66970 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_refused/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_review_refused/00005.png b/tests/snapshots/stax/test_use_case_review_refused/00005.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_review_refused/00005.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_static_review_accepted/00000.png new file mode 100644 index 0000000..dd9e4bf Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_accepted/00001.png b/tests/snapshots/stax/test_use_case_static_review_accepted/00001.png new file mode 100644 index 0000000..62aca34 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_accepted/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_static_review_accepted/00002.png new file mode 100644 index 0000000..7752acf Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_accepted/00003.png b/tests/snapshots/stax/test_use_case_static_review_accepted/00003.png new file mode 100644 index 0000000..392165d Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_accepted/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_accepted/00004.png b/tests/snapshots/stax/test_use_case_static_review_accepted/00004.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_accepted/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_refused/00000.png b/tests/snapshots/stax/test_use_case_static_review_refused/00000.png new file mode 100644 index 0000000..dd9e4bf Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_refused/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_refused/00001.png b/tests/snapshots/stax/test_use_case_static_review_refused/00001.png new file mode 100644 index 0000000..62aca34 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_refused/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_refused/00002.png b/tests/snapshots/stax/test_use_case_static_review_refused/00002.png new file mode 100644 index 0000000..7752acf Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_refused/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_refused/00003.png b/tests/snapshots/stax/test_use_case_static_review_refused/00003.png new file mode 100644 index 0000000..2b66970 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_refused/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_static_review_refused/00004.png b/tests/snapshots/stax/test_use_case_static_review_refused/00004.png new file mode 100644 index 0000000..ab186cf Binary files /dev/null and b/tests/snapshots/stax/test_use_case_static_review_refused/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00000.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00000.png new file mode 100644 index 0000000..ae0f2ae Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00001.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00001.png new file mode 100644 index 0000000..69f0c9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00002.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00002.png new file mode 100644 index 0000000..b159d1b Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00003.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00003.png new file mode 100644 index 0000000..512cd20 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00004.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00004.png new file mode 100644 index 0000000..dff1b9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00005.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00005.png new file mode 100644 index 0000000..e27d03f Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00005.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00006.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00006.png new file mode 100644 index 0000000..392165d Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00006.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted/00007.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00007.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted/00007.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00000.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00000.png new file mode 100644 index 0000000..ae0f2ae Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00001.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00001.png new file mode 100644 index 0000000..69f0c9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00002.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00002.png new file mode 100644 index 0000000..b159d1b Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00003.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00003.png new file mode 100644 index 0000000..512cd20 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00004.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00004.png new file mode 100644 index 0000000..dff1b9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00005.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00005.png new file mode 100644 index 0000000..2201e72 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00005.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00006.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00006.png new file mode 100644 index 0000000..22d8072 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00006.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00007.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00007.png new file mode 100644 index 0000000..dff1b9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00007.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00008.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00008.png new file mode 100644 index 0000000..e27d03f Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00008.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00009.png b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00009.png new file mode 100644 index 0000000..392165d Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_accepted_with_more/00009.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00000.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00000.png new file mode 100644 index 0000000..ae0f2ae Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00000.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00001.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00001.png new file mode 100644 index 0000000..69f0c9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00001.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00002.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00002.png new file mode 100644 index 0000000..b159d1b Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00002.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00003.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00003.png new file mode 100644 index 0000000..512cd20 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00003.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00004.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00004.png new file mode 100644 index 0000000..dff1b9c Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00004.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00005.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00005.png new file mode 100644 index 0000000..e27d03f Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00005.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00006.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00006.png new file mode 100644 index 0000000..abc9677 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00006.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00007.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00007.png new file mode 100644 index 0000000..2b66970 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00007.png differ diff --git a/tests/snapshots/stax/test_use_case_streaming_review_refused/00008.png b/tests/snapshots/stax/test_use_case_streaming_review_refused/00008.png new file mode 100644 index 0000000..1afa675 Binary files /dev/null and b/tests/snapshots/stax/test_use_case_streaming_review_refused/00008.png differ diff --git a/tests/test_app_mainmenu.py b/tests/test_app_mainmenu.py index 1fd72fc..0bcbd35 100644 --- a/tests/test_app_mainmenu.py +++ b/tests/test_app_mainmenu.py @@ -19,6 +19,7 @@ def test_app_mainmenu(firmware, navigator, test_name, default_screenshot_path): NavInsID.USE_CASE_CHOICE_CONFIRM, NavIns(NavInsID.TOUCH, (200, 261)), NavInsID.USE_CASE_SETTINGS_NEXT, + NavInsID.USE_CASE_SETTINGS_NEXT, NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT ] elif firmware is Firmware.FLEX: @@ -29,6 +30,7 @@ def test_app_mainmenu(firmware, navigator, test_name, default_screenshot_path): NavInsID.USE_CASE_CHOICE_CONFIRM, NavIns(NavInsID.TOUCH, (200, 300)), NavInsID.USE_CASE_SETTINGS_NEXT, + NavInsID.USE_CASE_SETTINGS_NEXT, NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT ] navigator.navigate_and_compare(default_screenshot_path, test_name, instructions, diff --git a/tests/test_appname_cmd.py b/tests/test_appname_cmd.py index 435520b..1a4d6da 100644 --- a/tests/test_appname_cmd.py +++ b/tests/test_appname_cmd.py @@ -1,12 +1,12 @@ -from application_client.boilerplate_command_sender import BoilerplateCommandSender -from application_client.boilerplate_response_unpacker import unpack_get_app_name_response +from application_client.nbgl_command_sender import NBGLCommandSender +from application_client.nbgl_response_unpacker import unpack_get_app_name_response # In this test we check that the GET_APP_NAME replies the application name def test_app_name(backend): # Use the app interface instead of raw interface - client = BoilerplateCommandSender(backend) + 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" + assert unpack_get_app_name_response(response.data) == "NBGL Tests" diff --git a/tests/test_error_cmd.py b/tests/test_error_cmd.py index e2f3d39..7e55b88 100644 --- a/tests/test_error_cmd.py +++ b/tests/test_error_cmd.py @@ -1,7 +1,7 @@ import pytest from ragger.error import ExceptionRAPDU -from application_client.boilerplate_command_sender import CLA, InsType, P1, P2, Errors +from application_client.nbgl_command_sender import CLA, InsType, P1, P2, Errors # Ensure the app returns an error when a bad CLA is used diff --git a/tests/test_name_version.py b/tests/test_name_version.py index 566a645..d11ed28 100644 --- a/tests/test_name_version.py +++ b/tests/test_name_version.py @@ -1,15 +1,15 @@ -from application_client.boilerplate_command_sender import BoilerplateCommandSender -from application_client.boilerplate_response_unpacker import unpack_get_app_and_version_response +from application_client.nbgl_command_sender import NBGLCommandSender +from application_client.nbgl_response_unpacker import unpack_get_app_and_version_response # 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): # Use the app interface instead of raw interface - client = BoilerplateCommandSender(backend) + client = NBGLCommandSender(backend) # Send the special instruction to BOLOS response = client.get_app_and_version() # 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 app_name == "NBGL Tests" assert version == "1.0.0" diff --git a/tests/test_review1.py b/tests/test_review1.py deleted file mode 100644 index 17aba41..0000000 --- a/tests/test_review1.py +++ /dev/null @@ -1,29 +0,0 @@ -import pytest - -from application_client.boilerplate_command_sender import BoilerplateCommandSender, Errors -from ragger.error import ExceptionRAPDU - - -# In this test we check that the TEST_REVIEW1 replies OK if the user accepts -def test_review1_accepted(backend, scenario_navigator): - client = BoilerplateCommandSender(backend) - - with client.test_review1(): - scenario_navigator.review_approve() - - status = client.get_async_response().status - - assert status == 0x9000 - - -# In this test we check that the TEST_REVIEW1 replies an error if the user refuses -def test_review1_refused(backend, scenario_navigator): - client = BoilerplateCommandSender(backend) - - with pytest.raises(ExceptionRAPDU) as e: - with client.test_review1(): - scenario_navigator.review_reject() - - # Assert that we have received a refusal - assert e.value.status == Errors.SW_DENY - assert len(e.value.data) == 0 diff --git a/tests/test_review2.py b/tests/test_review2.py deleted file mode 100644 index 3a92b78..0000000 --- a/tests/test_review2.py +++ /dev/null @@ -1,28 +0,0 @@ -import pytest - -from application_client.boilerplate_command_sender import BoilerplateCommandSender, Errors -from ragger.error import ExceptionRAPDU - - -# In this test we check that the TEST_REVIEW2 replies OK if the user accepts -def test_review2_accepted(backend, scenario_navigator): - client = BoilerplateCommandSender(backend) - with client.test_review2(): - scenario_navigator.address_review_approve() - - status = client.get_async_response().status - - assert status == 0x9000 - - -# In this test we check that the TEST_REVIEW2 replies an error if the user refuses -def test_review2_refused(backend, scenario_navigator): - client = BoilerplateCommandSender(backend) - - with pytest.raises(ExceptionRAPDU) as e: - with client.test_review2(): - scenario_navigator.address_review_reject() - - # Assert that we have received a refusal - assert e.value.status == Errors.SW_DENY - assert len(e.value.data) == 0 diff --git a/tests/test_spinner.py b/tests/test_spinner.py new file mode 100644 index 0000000..ce26466 --- /dev/null +++ b/tests/test_spinner.py @@ -0,0 +1,16 @@ +from application_client.nbgl_command_sender import NBGLCommandSender +from ragger.navigator import NavInsID, NavIns + +def test_spinner(backend, navigator, test_name, default_screenshot_path): + client = NBGLCommandSender(backend) + + 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 new file mode 100644 index 0000000..505a2d3 --- /dev/null +++ b/tests/test_use_case_address_review.py @@ -0,0 +1,61 @@ +from application_client.nbgl_command_sender import NBGLCommandSender, SW_OK +from ragger.firmware import Firmware +from ragger.navigator import NavInsID, NavIns + +def test_use_case_address_review_accepted(backend, firmware, navigator, test_name, default_screenshot_path): + 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) + ] + + with client.test_use_case_address_review(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + + 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): + 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) + ] + + with client.test_use_case_long_address_review(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + + 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): + 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) + ] + + with client.test_use_case_long_address_review_with_tags(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + + status = client.get_async_response().status + + # Assert that we have received an approval + assert status == SW_OK diff --git a/tests/test_use_case_legacy_review.py b/tests/test_use_case_legacy_review.py new file mode 100644 index 0000000..5f94bad --- /dev/null +++ b/tests/test_use_case_legacy_review.py @@ -0,0 +1,68 @@ +import pytest + +from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK +from ragger.error import ExceptionRAPDU +from ragger.navigator import NavInsID, NavIns + + +def test_use_case_static_review_accepted(backend, scenario_navigator): + client = NBGLCommandSender(backend) + + with client.test_use_case_static_review(): + scenario_navigator.review_approve() + + status = client.get_async_response().status + + # 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): + client = NBGLCommandSender(backend) + + instructions = [ + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.SWIPE_CENTER_TO_LEFT), + NavIns(NavInsID.USE_CASE_CHOICE_REJECT) + ] + + with pytest.raises(ExceptionRAPDU) as e: + with client.test_use_case_static_review(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + + # Assert that we have received a refusal + 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): + client = NBGLCommandSender(backend) + 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) + + status = client.get_async_response().status + + # 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): + 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) + ] + + with pytest.raises(ExceptionRAPDU) as e: + with client.test_use_case_light_review(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + + # Assert that we have received a refusal + assert e.value.status == Errors.SW_DENY + assert len(e.value.data) == 0 diff --git a/tests/test_use_case_review.py b/tests/test_use_case_review.py new file mode 100644 index 0000000..9e2c603 --- /dev/null +++ b/tests/test_use_case_review.py @@ -0,0 +1,59 @@ +import pytest + +from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK +from ragger.error import ExceptionRAPDU +from ragger.navigator import NavInsID + + +def test_use_case_review_accepted(backend, scenario_navigator): + client = NBGLCommandSender(backend) + + with client.test_use_case_review(): + scenario_navigator.review_approve() + + status = client.get_async_response().status + + # 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): + client = NBGLCommandSender(backend) + + with client.test_use_case_blind_signed_review(): + navigator.navigate_and_compare(default_screenshot_path, + test_name+"/BS_screen", + [NavInsID.USE_CASE_CHOICE_REJECT], + screen_change_after_last_instruction=False) + scenario_navigator.review_approve() + + status = client.get_async_response().status + + # 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): + client = NBGLCommandSender(backend) + + instructions = [ + NavInsID.USE_CASE_CHOICE_REJECT, + NavInsID.INFO_HEADER_TAP, + NavInsID.LEFT_HEADER_TAP, + NavInsID.USE_CASE_REVIEW_REJECT, + NavInsID.USE_CASE_CHOICE_CONFIRM + ] + with pytest.raises(ExceptionRAPDU) as e: + 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): + client = NBGLCommandSender(backend) + + with pytest.raises(ExceptionRAPDU) as e: + with client.test_use_case_review(): + scenario_navigator.review_reject() + + # Assert that we have received a refusal + assert e.value.status == Errors.SW_DENY + assert len(e.value.data) == 0 diff --git a/tests/test_use_case_streaming_review.py b/tests/test_use_case_streaming_review.py new file mode 100644 index 0000000..ed63e06 --- /dev/null +++ b/tests/test_use_case_streaming_review.py @@ -0,0 +1,82 @@ +import pytest + +from application_client.nbgl_command_sender import NBGLCommandSender, Errors, SW_OK +from ragger.error import ExceptionRAPDU +from ragger.firmware import Firmware +from ragger.navigator import NavInsID, NavIns + + +def test_use_case_streaming_review_accepted(backend, scenario_navigator): + client = NBGLCommandSender(backend) + + with client.test_use_case_streaming_review(): + scenario_navigator.review_approve() + + status = client.get_async_response().status + + # 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): + client = NBGLCommandSender(backend) + + 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], + screen_change_after_last_instruction=False) + scenario_navigator.review_approve() + + status = client.get_async_response().status + + # 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): + client = NBGLCommandSender(backend) + + # Navigate in the main menu + if firmware is Firmware.STAX: + instructions = [ + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.SWIPE_CENTER_TO_LEFT, + NavIns(NavInsID.TOUCH, (190, 424)), + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.CANCEL_FOOTER_TAP , + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.USE_CASE_REVIEW_CONFIRM + ] + elif firmware is Firmware.FLEX: + instructions = [ + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.SWIPE_CENTER_TO_LEFT, + NavIns(NavInsID.TOUCH, (217, 360)), + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.CANCEL_FOOTER_TAP , + NavInsID.SWIPE_CENTER_TO_LEFT, + NavInsID.USE_CASE_REVIEW_CONFIRM + ] + + with client.test_use_case_streaming_review(): + navigator.navigate_and_compare(default_screenshot_path, test_name, instructions) + + status = client.get_async_response().status + + # Assert that we have received an approval + assert status == SW_OK + +def test_use_case_streaming_review_refused(backend, scenario_navigator): + client = NBGLCommandSender(backend) + + with pytest.raises(ExceptionRAPDU) as e: + with client.test_use_case_streaming_review(): + scenario_navigator.review_reject() + + # Assert that we have received a refusal + assert e.value.status == Errors.SW_DENY + assert len(e.value.data) == 0 diff --git a/tests/test_version_cmd.py b/tests/test_version_cmd.py index 700d049..eb0c25a 100644 --- a/tests/test_version_cmd.py +++ b/tests/test_version_cmd.py @@ -1,5 +1,5 @@ -from application_client.boilerplate_command_sender import BoilerplateCommandSender -from application_client.boilerplate_response_unpacker import unpack_get_version_response +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 @@ -9,7 +9,7 @@ # In this test we check the behavior of the device when asked to provide the app version def test_version(backend): # Use the app interface instead of raw interface - client = BoilerplateCommandSender(backend) + client = NBGLCommandSender(backend) # Send the GET_VERSION instruction rapdu = client.get_version() # Use an helper to parse the response, assert the values