Skip to content

Commit

Permalink
Adding settings and information tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iartemov-ledger committed Jan 7, 2025
1 parent 7abd9c6 commit 3174d78
Show file tree
Hide file tree
Showing 223 changed files with 179 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
179 changes: 179 additions & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
"""Verifies settings and information navigation
"""
from pathlib import Path
from ragger.navigator import NavInsID, NavIns

TESTS_ROOT_DIR = Path(__file__).parent

# Flex screen parameters
FLEX_WIDTH = 480
FLEX_HEIGHT = 600
FLEX_HEADER_HEIGHT = 95
FLEX_ITEM_HEIGHT = 92
FLEX_SETTINGS_X = 404
FLEX_SETTINGS_Y = 75

# Stax screen parameters
STAX_WIDTH = 400
STAX_HEIGHT = 672
STAX_HEADER_HEIGHT = 87
STAX_ITEM_HEIGHT = 96
STAX_SETTINGS_X = 335
STAX_SETTINGS_Y = 63

def _get_settings_button_coordinates(firmware):
if firmware.device == "flex":
return (FLEX_SETTINGS_X, FLEX_SETTINGS_Y)
if firmware.device == "stax":
return (STAX_SETTINGS_X, STAX_SETTINGS_Y)
return (0, 0)

def _get_settings_element_coordinates(firmware, number):
if firmware.device == "flex":
return (FLEX_WIDTH//2, FLEX_HEADER_HEIGHT + (number)*FLEX_ITEM_HEIGHT + FLEX_ITEM_HEIGHT//2)
if firmware.device == "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.device in ["flex", "stax"]:
instructions = [
# 0 (Main page)->Settings button = Page 1
NavIns(NavInsID.TOUCH, _get_settings_button_coordinates(firmware)),
# 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
NavIns(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
NavIns(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
NavIns(NavInsID.USE_CASE_CHOICE_CONFIRM),
#11 (Main page)
NavIns(NavInsID.WAIT_FOR_HOME_SCREEN),
# 12 (Main page)->Settings button = Page 1
NavIns(NavInsID.TOUCH, _get_settings_button_coordinates(firmware)),
# 13 (Page 1)->Select Account = Select account
NavIns(NavInsID.TOUCH, _get_settings_element_coordinates(firmware, 0)),
# 14 (Select account)-> Back = Page 1
NavIns(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
NavIns(NavInsID.USE_CASE_SETTINGS_SINGLE_PAGE_EXIT),
]
elif firmware.device in ["nanosp", "nanos", "nanox"]:
instructions = [
# Setting Account 2
NavIns(NavInsID.RIGHT_CLICK), # = Settings HL
NavIns(NavInsID.BOTH_CLICK), # = Settings LL
NavIns(NavInsID.BOTH_CLICK), # = Select Account (0+)
NavIns(NavInsID.RIGHT_CLICK), # = 1
NavIns(NavInsID.RIGHT_CLICK), # = 2
NavIns(NavInsID.BOTH_CLICK), # = Main page
# Verification Account 2
NavIns(NavInsID.RIGHT_CLICK), # = Settings HL
NavIns(NavInsID.BOTH_CLICK), # = Settings LL
NavIns(NavInsID.BOTH_CLICK), # = Select Account (0, 2+)
NavIns(NavInsID.RIGHT_CLICK), # = 1, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 2, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 3, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 4, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 5, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 6, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 7, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 8, 2+
NavIns(NavInsID.RIGHT_CLICK), # = 9, 2+
NavIns(NavInsID.RIGHT_CLICK), # = Abort, 2+
NavIns(NavInsID.BOTH_CLICK), # = Main page
# Setting "Test Network"
NavIns(NavInsID.RIGHT_CLICK), # = Settings HL
NavIns(NavInsID.BOTH_CLICK), # = Settings LL
NavIns(NavInsID.RIGHT_CLICK), # = Select Network
NavIns(NavInsID.BOTH_CLICK), # = Select Network (Main Network, Stage Network+)
NavIns(NavInsID.RIGHT_CLICK), # = Select Network (Stage Network, Stage Network+)
NavIns(NavInsID.RIGHT_CLICK), # = Select Network (Test Network, Stage Network+)
NavIns(NavInsID.BOTH_CLICK), # = Main page
# Verification "Test Network"
NavIns(NavInsID.RIGHT_CLICK), # = Settings HL
NavIns(NavInsID.BOTH_CLICK), # = Settings LL
NavIns(NavInsID.RIGHT_CLICK), # = Select Network
NavIns(NavInsID.BOTH_CLICK), # = Select Network (Main Network, Test Network+)
NavIns(NavInsID.RIGHT_CLICK), # = Select Network (Stage Network, Test Network+)
NavIns(NavInsID.RIGHT_CLICK), # = Select Network (Test Network, Test Network+)
NavIns(NavInsID.RIGHT_CLICK), # = Select Network (Abort, Test Network+)
NavIns(NavInsID.BOTH_CLICK), # = Main page
# Reset settings
NavIns(NavInsID.RIGHT_CLICK), # = Settings HL
NavIns(NavInsID.BOTH_CLICK), # = Settings LL
NavIns(NavInsID.RIGHT_CLICK), # = Select Network
NavIns(NavInsID.RIGHT_CLICK), # = Show 25 words
NavIns(NavInsID.RIGHT_CLICK), # = Reset
NavIns(NavInsID.BOTH_CLICK), # = Really reset
NavIns(NavInsID.RIGHT_CLICK), # = No
NavIns(NavInsID.RIGHT_CLICK), # = Yes
NavIns(NavInsID.BOTH_CLICK), # = Main page
# Verification Account 0
NavIns(NavInsID.RIGHT_CLICK), # = Settings HL
NavIns(NavInsID.BOTH_CLICK), # = Settings LL
NavIns(NavInsID.BOTH_CLICK), # = Select Account (0, 0+)
NavIns(NavInsID.BOTH_CLICK), # = Main page
# Verification "Stage Network"
NavIns(NavInsID.RIGHT_CLICK), # = Settings HL
NavIns(NavInsID.BOTH_CLICK), # = Settings LL
NavIns(NavInsID.RIGHT_CLICK), # = Select Network
NavIns(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.device in ["flex", "stax"]:
instructions = [
# 0 (main page) -> Settings button = Page 1
NavIns(NavInsID.TOUCH, _get_settings_button_coordinates(firmware)),
# 1 (Page 1) -> Right = Info 1
NavIns(NavInsID.SWIPE_CENTER_TO_LEFT),
# 2 (Info 1) -> Right = Info 2
NavIns(NavInsID.SWIPE_CENTER_TO_LEFT),
]
elif firmware.device in ["nanosp", "nanox"]:
instructions = [
NavIns(NavInsID.RIGHT_CLICK), # = Settings
NavIns(NavInsID.RIGHT_CLICK), # = About
NavIns(NavInsID.BOTH_CLICK), # = About Info
NavIns(NavInsID.RIGHT_CLICK), # = Back
NavIns(NavInsID.BOTH_CLICK), # = Main page
]
elif firmware.device == "nanos":
instructions = [
NavIns(NavInsID.RIGHT_CLICK), # = Settings
NavIns(NavInsID.RIGHT_CLICK), # = About
NavIns(NavInsID.BOTH_CLICK), # = About Info 1
NavIns(NavInsID.RIGHT_CLICK), # = About Info 2
NavIns(NavInsID.RIGHT_CLICK), # = Back
NavIns(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 3174d78

Please sign in to comment.