Skip to content

Commit

Permalink
Merge pull request #142 from iartemov-ledger/test_settings
Browse files Browse the repository at this point in the history
Settings tests
  • Loading branch information
iartemov-ledger authored Jan 9, 2025
2 parents 4a33364 + 7b779f4 commit 40453af
Show file tree
Hide file tree
Showing 223 changed files with 169 additions and 0 deletions.
Binary file added tests/snapshots/flex/test_info/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_info/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_info/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_info/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00011.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00012.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00015.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/flex/test_settings/00017.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/nanos/test_info/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/nanos/test_info/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/nanos/test_info/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/snapshots/nanos/test_info/00003.png
Binary file added tests/snapshots/nanos/test_info/00004.png
Binary file added tests/snapshots/nanos/test_info/00005.png
Binary file added tests/snapshots/nanos/test_info/00006.png
Binary file added tests/snapshots/nanos/test_settings/00000.png
Binary file added tests/snapshots/nanos/test_settings/00001.png
Binary file added tests/snapshots/nanos/test_settings/00002.png
Binary file added tests/snapshots/nanos/test_settings/00003.png
Binary file added tests/snapshots/nanos/test_settings/00004.png
Binary file added tests/snapshots/nanos/test_settings/00005.png
Binary file added tests/snapshots/nanos/test_settings/00006.png
Binary file added tests/snapshots/nanos/test_settings/00007.png
Binary file added tests/snapshots/nanos/test_settings/00008.png
Binary file added tests/snapshots/nanos/test_settings/00009.png
Binary file added tests/snapshots/nanos/test_settings/00010.png
Binary file added tests/snapshots/nanos/test_settings/00011.png
Binary file added tests/snapshots/nanos/test_settings/00012.png
Binary file added tests/snapshots/nanos/test_settings/00013.png
Binary file added tests/snapshots/nanos/test_settings/00014.png
Binary file added tests/snapshots/nanos/test_settings/00015.png
Binary file added tests/snapshots/nanos/test_settings/00016.png
Binary file added tests/snapshots/nanos/test_settings/00017.png
Binary file added tests/snapshots/nanos/test_settings/00018.png
Binary file added tests/snapshots/nanos/test_settings/00019.png
Binary file added tests/snapshots/nanos/test_settings/00020.png
Binary file added tests/snapshots/nanos/test_settings/00021.png
Binary file added tests/snapshots/nanos/test_settings/00022.png
Binary file added tests/snapshots/nanos/test_settings/00023.png
Binary file added tests/snapshots/nanos/test_settings/00024.png
Binary file added tests/snapshots/nanos/test_settings/00025.png
Binary file added tests/snapshots/nanos/test_settings/00026.png
Binary file added tests/snapshots/nanos/test_settings/00027.png
Binary file added tests/snapshots/nanos/test_settings/00028.png
Binary file added tests/snapshots/nanos/test_settings/00029.png
Binary file added tests/snapshots/nanos/test_settings/00030.png
Binary file added tests/snapshots/nanos/test_settings/00031.png
Binary file added tests/snapshots/nanos/test_settings/00032.png
Binary file added tests/snapshots/nanos/test_settings/00033.png
Binary file added tests/snapshots/nanos/test_settings/00034.png
Binary file added tests/snapshots/nanos/test_settings/00035.png
Binary file added tests/snapshots/nanos/test_settings/00036.png
Binary file added tests/snapshots/nanos/test_settings/00037.png
Binary file added tests/snapshots/nanos/test_settings/00038.png
Binary file added tests/snapshots/nanos/test_settings/00039.png
Binary file added tests/snapshots/nanos/test_settings/00040.png
Binary file added tests/snapshots/nanos/test_settings/00041.png
Binary file added tests/snapshots/nanos/test_settings/00042.png
Binary file added tests/snapshots/nanos/test_settings/00043.png
Binary file added tests/snapshots/nanos/test_settings/00044.png
Binary file added tests/snapshots/nanos/test_settings/00045.png
Binary file added tests/snapshots/nanos/test_settings/00046.png
Binary file added tests/snapshots/nanos/test_settings/00047.png
Binary file added tests/snapshots/nanos/test_settings/00048.png
Binary file added tests/snapshots/nanos/test_settings/00049.png
Binary file added tests/snapshots/nanos/test_settings/00050.png
Binary file added tests/snapshots/nanos/test_settings/00051.png
Binary file added tests/snapshots/nanos/test_settings/00052.png
Binary file added tests/snapshots/nanosp/test_info/00000.png
Binary file added tests/snapshots/nanosp/test_info/00001.png
Binary file added tests/snapshots/nanosp/test_info/00002.png
Binary file added tests/snapshots/nanosp/test_info/00003.png
Binary file added tests/snapshots/nanosp/test_info/00004.png
Binary file added tests/snapshots/nanosp/test_info/00005.png
Binary file added tests/snapshots/nanosp/test_settings/00000.png
Binary file added tests/snapshots/nanosp/test_settings/00001.png
Binary file added tests/snapshots/nanosp/test_settings/00002.png
Binary file added tests/snapshots/nanosp/test_settings/00003.png
Binary file added tests/snapshots/nanosp/test_settings/00004.png
Binary file added tests/snapshots/nanosp/test_settings/00005.png
Binary file added tests/snapshots/nanosp/test_settings/00006.png
Binary file added tests/snapshots/nanosp/test_settings/00007.png
Binary file added tests/snapshots/nanosp/test_settings/00008.png
Binary file added tests/snapshots/nanosp/test_settings/00009.png
Binary file added tests/snapshots/nanosp/test_settings/00010.png
Binary file added tests/snapshots/nanosp/test_settings/00011.png
Binary file added tests/snapshots/nanosp/test_settings/00012.png
Binary file added tests/snapshots/nanosp/test_settings/00013.png
Binary file added tests/snapshots/nanosp/test_settings/00014.png
Binary file added tests/snapshots/nanosp/test_settings/00015.png
Binary file added tests/snapshots/nanosp/test_settings/00016.png
Binary file added tests/snapshots/nanosp/test_settings/00017.png
Binary file added tests/snapshots/nanosp/test_settings/00018.png
Binary file added tests/snapshots/nanosp/test_settings/00019.png
Binary file added tests/snapshots/nanosp/test_settings/00020.png
Binary file added tests/snapshots/nanosp/test_settings/00021.png
Binary file added tests/snapshots/nanosp/test_settings/00022.png
Binary file added tests/snapshots/nanosp/test_settings/00023.png
Binary file added tests/snapshots/nanosp/test_settings/00024.png
Binary file added tests/snapshots/nanosp/test_settings/00025.png
Binary file added tests/snapshots/nanosp/test_settings/00026.png
Binary file added tests/snapshots/nanosp/test_settings/00027.png
Binary file added tests/snapshots/nanosp/test_settings/00028.png
Binary file added tests/snapshots/nanosp/test_settings/00029.png
Binary file added tests/snapshots/nanosp/test_settings/00030.png
Binary file added tests/snapshots/nanosp/test_settings/00031.png
Binary file added tests/snapshots/nanosp/test_settings/00032.png
Binary file added tests/snapshots/nanosp/test_settings/00033.png
Binary file added tests/snapshots/nanosp/test_settings/00034.png
Binary file added tests/snapshots/nanosp/test_settings/00035.png
Binary file added tests/snapshots/nanosp/test_settings/00036.png
Binary file added tests/snapshots/nanosp/test_settings/00037.png
Binary file added tests/snapshots/nanosp/test_settings/00038.png
Binary file added tests/snapshots/nanosp/test_settings/00039.png
Binary file added tests/snapshots/nanosp/test_settings/00040.png
Binary file added tests/snapshots/nanosp/test_settings/00041.png
Binary file added tests/snapshots/nanosp/test_settings/00042.png
Binary file added tests/snapshots/nanosp/test_settings/00043.png
Binary file added tests/snapshots/nanosp/test_settings/00044.png
Binary file added tests/snapshots/nanosp/test_settings/00045.png
Binary file added tests/snapshots/nanosp/test_settings/00046.png
Binary file added tests/snapshots/nanosp/test_settings/00047.png
Binary file added tests/snapshots/nanosp/test_settings/00048.png
Binary file added tests/snapshots/nanosp/test_settings/00049.png
Binary file added tests/snapshots/nanosp/test_settings/00050.png
Binary file added tests/snapshots/nanosp/test_settings/00051.png
Binary file added tests/snapshots/nanosp/test_settings/00052.png
Binary file added tests/snapshots/nanox/test_info/00000.png
Binary file added tests/snapshots/nanox/test_info/00001.png
Binary file added tests/snapshots/nanox/test_info/00002.png
Binary file added tests/snapshots/nanox/test_info/00003.png
Binary file added tests/snapshots/nanox/test_info/00004.png
Binary file added tests/snapshots/nanox/test_info/00005.png
Binary file added tests/snapshots/nanox/test_settings/00000.png
Binary file added tests/snapshots/nanox/test_settings/00001.png
Binary file added tests/snapshots/nanox/test_settings/00002.png
Binary file added tests/snapshots/nanox/test_settings/00003.png
Binary file added tests/snapshots/nanox/test_settings/00004.png
Binary file added tests/snapshots/nanox/test_settings/00005.png
Binary file added tests/snapshots/nanox/test_settings/00006.png
Binary file added tests/snapshots/nanox/test_settings/00007.png
Binary file added tests/snapshots/nanox/test_settings/00008.png
Binary file added tests/snapshots/nanox/test_settings/00009.png
Binary file added tests/snapshots/nanox/test_settings/00010.png
Binary file added tests/snapshots/nanox/test_settings/00011.png
Binary file added tests/snapshots/nanox/test_settings/00012.png
Binary file added tests/snapshots/nanox/test_settings/00013.png
Binary file added tests/snapshots/nanox/test_settings/00014.png
Binary file added tests/snapshots/nanox/test_settings/00015.png
Binary file added tests/snapshots/nanox/test_settings/00016.png
Binary file added tests/snapshots/nanox/test_settings/00017.png
Binary file added tests/snapshots/nanox/test_settings/00018.png
Binary file added tests/snapshots/nanox/test_settings/00019.png
Binary file added tests/snapshots/nanox/test_settings/00020.png
Binary file added tests/snapshots/nanox/test_settings/00021.png
Binary file added tests/snapshots/nanox/test_settings/00022.png
Binary file added tests/snapshots/nanox/test_settings/00023.png
Binary file added tests/snapshots/nanox/test_settings/00024.png
Binary file added tests/snapshots/nanox/test_settings/00025.png
Binary file added tests/snapshots/nanox/test_settings/00026.png
Binary file added tests/snapshots/nanox/test_settings/00027.png
Binary file added tests/snapshots/nanox/test_settings/00028.png
Binary file added tests/snapshots/nanox/test_settings/00029.png
Binary file added tests/snapshots/nanox/test_settings/00030.png
Binary file added tests/snapshots/nanox/test_settings/00031.png
Binary file added tests/snapshots/nanox/test_settings/00032.png
Binary file added tests/snapshots/nanox/test_settings/00033.png
Binary file added tests/snapshots/nanox/test_settings/00034.png
Binary file added tests/snapshots/nanox/test_settings/00035.png
Binary file added tests/snapshots/nanox/test_settings/00036.png
Binary file added tests/snapshots/nanox/test_settings/00037.png
Binary file added tests/snapshots/nanox/test_settings/00038.png
Binary file added tests/snapshots/nanox/test_settings/00039.png
Binary file added tests/snapshots/nanox/test_settings/00040.png
Binary file added tests/snapshots/nanox/test_settings/00041.png
Binary file added tests/snapshots/nanox/test_settings/00042.png
Binary file added tests/snapshots/nanox/test_settings/00043.png
Binary file added tests/snapshots/nanox/test_settings/00044.png
Binary file added tests/snapshots/nanox/test_settings/00045.png
Binary file added tests/snapshots/nanox/test_settings/00046.png
Binary file added tests/snapshots/nanox/test_settings/00047.png
Binary file added tests/snapshots/nanox/test_settings/00048.png
Binary file added tests/snapshots/nanox/test_settings/00049.png
Binary file added tests/snapshots/nanox/test_settings/00050.png
Binary file added tests/snapshots/nanox/test_settings/00051.png
Binary file added tests/snapshots/nanox/test_settings/00052.png
Binary file added tests/snapshots/stax/test_info/00000.png
Binary file added tests/snapshots/stax/test_info/00001.png
Binary file added tests/snapshots/stax/test_info/00002.png
Binary file added tests/snapshots/stax/test_info/00003.png
Binary file added tests/snapshots/stax/test_settings/00000.png
Binary file added tests/snapshots/stax/test_settings/00001.png
Binary file added tests/snapshots/stax/test_settings/00002.png
Binary file added tests/snapshots/stax/test_settings/00003.png
Binary file added tests/snapshots/stax/test_settings/00004.png
Binary file added tests/snapshots/stax/test_settings/00005.png
Binary file added tests/snapshots/stax/test_settings/00006.png
Binary file added tests/snapshots/stax/test_settings/00007.png
Binary file added tests/snapshots/stax/test_settings/00008.png
Binary file added tests/snapshots/stax/test_settings/00009.png
Binary file added tests/snapshots/stax/test_settings/00010.png
Binary file added tests/snapshots/stax/test_settings/00011.png
Binary file added tests/snapshots/stax/test_settings/00012.png
Binary file added tests/snapshots/stax/test_settings/00013.png
Binary file added tests/snapshots/stax/test_settings/00014.png
Binary file added tests/snapshots/stax/test_settings/00015.png
Binary file added tests/snapshots/stax/test_settings/00016.png
Binary file added tests/snapshots/stax/test_settings/00017.png
169 changes: 169 additions & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
"""Verifies settings and information navigation
"""
from pathlib import Path
from ragger.navigator import NavInsID, NavIns
from ragger.firmware import Firmware

TESTS_ROOT_DIR = Path(__file__).parent

# Flex screen parameters
FLEX_WIDTH = 480
FLEX_HEIGHT = 600
FLEX_HEADER_HEIGHT = 95
FLEX_ITEM_HEIGHT = 92

# Stax screen parameters
STAX_WIDTH = 400
STAX_HEIGHT = 672
STAX_HEADER_HEIGHT = 87
STAX_ITEM_HEIGHT = 96

def _get_settings_element_coordinates(firmware, number):
if firmware == Firmware.FLEX:
return (FLEX_WIDTH//2, FLEX_HEADER_HEIGHT + (number)*FLEX_ITEM_HEIGHT + FLEX_ITEM_HEIGHT//2)
if firmware == Firmware.STAX:
return (STAX_WIDTH//2, STAX_HEADER_HEIGHT + (number)*STAX_ITEM_HEIGHT + STAX_ITEM_HEIGHT//2)
return (0, 0)

def test_settings(navigator, firmware, test_name):
"""Verifies settings navigation
"""
instructions = []
if firmware in [Firmware.FLEX, Firmware.STAX]:
instructions = [
# 0 (Main page)->Settings button = Page 1
NavInsID.USE_CASE_HOME_SETTINGS,
# 1 (Page 1)->Select Account = Select account
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 0)),
# 2 (Select account)->Selecting account 2 = Page 1
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 2)),
# 3 (Page 1)-> Select Account = Select account
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 0)),
# 4 (Select account)-> Back = Page 1
NavInsID.USE_CASE_SETTINGS_SINGLE_PAGE_EXIT,
#5 (Page 1)-> Select Network = Select network
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 1)),
#6 (Select network)-> Test network = Page 1
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 2)),
#7 (Page 1)-> Select Network = Select network
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 1)),
# 8 (Select account)-> Back = Page 1
NavInsID.USE_CASE_SETTINGS_SINGLE_PAGE_EXIT,
#9 (Page 1)-> Reset = Confirmation
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 2)),
#10 (Confirmation)-> Reset = Text, Main page
NavInsID.USE_CASE_CHOICE_CONFIRM,
#11 (Main page)
NavInsID.WAIT_FOR_HOME_SCREEN,
# 12 (Main page)->Settings button = Page 1
NavInsID.USE_CASE_HOME_SETTINGS,
# 13 (Page 1)->Select Account = Select account
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 0)),
# 14 (Select account)-> Back = Page 1
NavInsID.USE_CASE_SETTINGS_SINGLE_PAGE_EXIT,
#15 (Page 1)-> Select Network = Select network
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 1)),
# 16 (Select account)-> Back = Page 1
NavInsID.USE_CASE_SETTINGS_SINGLE_PAGE_EXIT,
]
elif firmware.is_nano:
instructions = [
# Setting Account 2
NavInsID.RIGHT_CLICK, # = Settings HL
NavInsID.BOTH_CLICK, # = Settings LL
NavInsID.BOTH_CLICK, # = Select Account (0+)
NavInsID.RIGHT_CLICK, # = 1
NavInsID.RIGHT_CLICK, # = 2
NavInsID.BOTH_CLICK, # = Main page
# Verification Account 2
NavInsID.RIGHT_CLICK, # = Settings HL
NavInsID.BOTH_CLICK, # = Settings LL
NavInsID.BOTH_CLICK, # = Select Account (0, 2+)
NavInsID.RIGHT_CLICK, # = 1, 2+
NavInsID.RIGHT_CLICK, # = 2, 2+
NavInsID.RIGHT_CLICK, # = 3, 2+
NavInsID.RIGHT_CLICK, # = 4, 2+
NavInsID.RIGHT_CLICK, # = 5, 2+
NavInsID.RIGHT_CLICK, # = 6, 2+
NavInsID.RIGHT_CLICK, # = 7, 2+
NavInsID.RIGHT_CLICK, # = 8, 2+
NavInsID.RIGHT_CLICK, # = 9, 2+
NavInsID.RIGHT_CLICK, # = Abort, 2+
NavInsID.BOTH_CLICK, # = Main page
# Setting "Test Network"
NavInsID.RIGHT_CLICK, # = Settings HL
NavInsID.BOTH_CLICK, # = Settings LL
NavInsID.RIGHT_CLICK, # = Select Network
NavInsID.BOTH_CLICK, # = Select Network (Main Network, Stage Network+)
NavInsID.RIGHT_CLICK, # = Select Network (Stage Network, Stage Network+)
NavInsID.RIGHT_CLICK, # = Select Network (Test Network, Stage Network+)
NavInsID.BOTH_CLICK, # = Main page
# Verification "Test Network"
NavInsID.RIGHT_CLICK, # = Settings HL
NavInsID.BOTH_CLICK, # = Settings LL
NavInsID.RIGHT_CLICK, # = Select Network
NavInsID.BOTH_CLICK, # = Select Network (Main Network, Test Network+)
NavInsID.RIGHT_CLICK, # = Select Network (Stage Network, Test Network+)
NavInsID.RIGHT_CLICK, # = Select Network (Test Network, Test Network+)
NavInsID.RIGHT_CLICK, # = Select Network (Abort, Test Network+)
NavInsID.BOTH_CLICK, # = Main page
# Reset settings
NavInsID.RIGHT_CLICK, # = Settings HL
NavInsID.BOTH_CLICK, # = Settings LL
NavInsID.RIGHT_CLICK, # = Select Network
NavInsID.RIGHT_CLICK, # = Show 25 words
NavInsID.RIGHT_CLICK, # = Reset
NavInsID.BOTH_CLICK, # = Really reset
NavInsID.RIGHT_CLICK, # = No
NavInsID.RIGHT_CLICK, # = Yes
NavInsID.BOTH_CLICK, # = Main page
# Verification Account 0
NavInsID.RIGHT_CLICK, # = Settings HL
NavInsID.BOTH_CLICK, # = Settings LL
NavInsID.BOTH_CLICK, # = Select Account (0, 0+)
NavInsID.BOTH_CLICK, # = Main page
# Verification "Stage Network"
NavInsID.RIGHT_CLICK, # = Settings HL
NavInsID.BOTH_CLICK, # = Settings LL
NavInsID.RIGHT_CLICK, # = Select Network
NavInsID.BOTH_CLICK, # = Select Network (Main Network, Stage Network+)
]
navigator.navigate_and_compare(TESTS_ROOT_DIR,
test_name,
instructions,
screen_change_before_first_instruction = False)

def test_info(navigator, firmware, test_name):
"""Verifies info navigation
"""
instructions = []
if firmware in [Firmware.FLEX, Firmware.STAX]:
instructions = [
# 0 (main page) -> Settings button = Page 1
NavInsID.USE_CASE_HOME_SETTINGS,
# 1 (Page 1) -> Right = Info 1
NavInsID.SWIPE_CENTER_TO_LEFT,
# 2 (Info 1) -> Right = Info 2
NavInsID.SWIPE_CENTER_TO_LEFT,
]
elif firmware.is_nano and not Firmware.NANOS:
instructions = [
NavInsID.RIGHT_CLICK, # = Settings
NavInsID.RIGHT_CLICK, # = About
NavInsID.BOTH_CLICK, # = About Info
NavInsID.RIGHT_CLICK, # = Back
NavInsID.BOTH_CLICK, # = Main page
]
elif firmware is Firmware.NANOS:
instructions = [
NavInsID.RIGHT_CLICK, # = Settings
NavInsID.RIGHT_CLICK, # = About
NavInsID.BOTH_CLICK, # = About Info 1
NavInsID.RIGHT_CLICK, # = About Info 2
NavInsID.RIGHT_CLICK, # = Back
NavInsID.BOTH_CLICK, # = Main page
]
navigator.navigate_and_compare(TESTS_ROOT_DIR,
test_name,
instructions,
screen_change_before_first_instruction = False)

0 comments on commit 40453af

Please sign in to comment.