Skip to content

Commit

Permalink
Added a new ragger test
Browse files Browse the repository at this point in the history
  • Loading branch information
apaillier-ledger committed Jul 6, 2023
1 parent c836074 commit e019eed
Show file tree
Hide file tree
Showing 25 changed files with 30 additions and 1 deletion.
Binary file modified tests/ragger/snapshots/nanosp/domain_name_non_mainnet/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/ragger/snapshots/nanox/domain_name_non_mainnet/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/ragger/snapshots/stax/domain_name_non_mainnet/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 modified tests/ragger/snapshots/stax/domain_name_non_mainnet/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 modified tests/ragger/snapshots/stax/domain_name_non_mainnet/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 30 additions & 1 deletion tests/ragger/test_domain_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,42 @@ def test_send_fund_non_mainnet(firmware: Firmware,
moves += [ NavInsID.RIGHT_CLICK ] * 5
moves += [ NavInsID.BOTH_CLICK ]
else:
moves += [ NavInsID.USE_CASE_REVIEW_TAP ] * 3
moves += [ NavInsID.USE_CASE_REVIEW_TAP ] * 2
moves += [ NavInsID.USE_CASE_REVIEW_CONFIRM ]
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH,
"domain_name_non_mainnet",
moves)


def test_send_fund_unknown_chain(firmware: Firmware,
backend: BackendInterface,
navigator: Navigator,
test_name: str):
app_client = EthAppClient(backend)
challenge = common(app_client)

with app_client.provide_domain_name(challenge, NAME, ADDR):
pass

with app_client.send_fund(BIP32_PATH,
NONCE,
GAS_PRICE,
GAS_LIMIT,
ADDR,
AMOUNT,
9):
moves = list()
if firmware.device.startswith("nano"):
moves += [ NavInsID.RIGHT_CLICK ] * 5
moves += [ NavInsID.BOTH_CLICK ]
else:
moves += [ NavInsID.USE_CASE_REVIEW_TAP ] * 3
moves += [ NavInsID.USE_CASE_REVIEW_CONFIRM ]
navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH,
"domain_name_unknown_chain",
moves)


def test_send_fund_domain_too_long(firmware: Firmware,
backend: BackendInterface,
navigator: Navigator):
Expand Down

0 comments on commit e019eed

Please sign in to comment.