forked from LedgerHQ/app-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_app_mainmenu.py
29 lines (26 loc) · 1.07 KB
/
test_app_mainmenu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from ragger.navigator import NavInsID, NavIns
from utils import ROOT_SCREENSHOT_PATH
# In this test we check the behavior of the device main menu
def test_app_mainmenu(firmware, navigator, test_name):
# Navigate in the main menu
if firmware.device.startswith("nano"):
instructions = [
NavInsID.RIGHT_CLICK,
NavInsID.RIGHT_CLICK,
NavInsID.RIGHT_CLICK
]
else:
instructions = [
NavInsID.USE_CASE_HOME_SETTINGS,
NavInsID.USE_CASE_SETTINGS_NEXT,
NavIns(NavInsID.TOUCH, (200, 113)),
NavIns(NavInsID.TOUCH, (200, 261)),
NavInsID.USE_CASE_CHOICE_CONFIRM,
NavInsID.USE_CASE_SETTINGS_NEXT,
NavIns(NavInsID.TOUCH, (200, 261)),
NavIns(NavInsID.TOUCH, (200, 261)),
NavInsID.USE_CASE_CHOICE_REJECT,
NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT
]
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, test_name, instructions,
screen_change_before_first_instruction=False)