Skip to content

Commit 2e036be

Browse files
committed
test(report): capture all EIP-712 field screens
1 parent 1336e05 commit 2e036be

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

scripts/generate-test-report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,7 @@ def _arg_shown(a):
29352935
'f2cee375...912090f and messageHash c52c0ee5...4b371e, both published, both matched on '
29362936
'hardware and in the emulator.',
29372937
['Domain name', 'Domain version', 'chainId', 'verifyingContract (42 chars, in full)',
2938-
'Cow / wallet', 'Bob / wallet', 'contents']),
2938+
'From name: Cow', 'From wallet', 'To name: Bob', 'To wallet', 'contents']),
29392939
('TD2', 'test_msg_eip712_streaming', 'test_array_of_structs_walks',
29402940
'An array of structs walks and signs',
29412941
'Arrays hash WITHOUT a typeHash prefix -- enc(array) is the keccak of the concatenated '

tests/test_msg_eip712_streaming.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ def _walk(self, doc, max_steps=400):
118118
resp = self.client.call_raw(msg)
119119
for _ in range(max_steps):
120120
if isinstance(resp, proto.ButtonRequest):
121+
# This is a manual, device-driven call_raw() loop, so no
122+
# callback_ButtonRequest() will capture the field being
123+
# approved. Retain it while that exact field is still active.
124+
self.client.capture_oled()
121125
self.client.debug.press_yes()
122126
resp = self.client.call_raw(proto.ButtonAck())
123127
elif isinstance(resp, eth.EthereumTypedDataStructRequest):
@@ -140,6 +144,8 @@ def setUp(self):
140144
self.requires_structured_eip712()
141145
self.setup_mnemonic_nopin_nopassphrase()
142146
self.client.apply_policy('AdvancedMode', 1)
147+
# The report entries describe typed-data fields, not the policy prompt.
148+
self.client.reset_screenshots()
143149

144150
def test_spec_example_matches_the_published_hashes(self):
145151
"""The device's own hashes equal the EIP-712 reference implementation's.

0 commit comments

Comments
 (0)