LedgerHQ / app-bitcoin-new

Modern Bitcoin Application based on PSBT and Descriptors
Apache License 2.0
93 stars 69 forks source link

Explicitly test text content in ragger tests #251

Open bigspider opened 5 months ago

bigspider commented 5 months ago

The test test_register_wallet_tr_with_nums_keypath added in #250 explicitly needs to check that the key @0 in the wallet policy is correctly identified as dummy. The test currently relies on the screenshot.

It would be great to also test explicitly the text events that appeared on screen, in order to prevent an incorrect screenshot to be inadvertently attached to the test. For example, in the above test, one could check that the string Key @0, dummy did appear on-screen at some point.

Another test where such checks make sense: test_sign_psbt_singlesig_large_amount.

Once this is addressed in ragger, it's worth going through the ragger tests to add the relevant screen checks based on the text events.