Updated ERC 721 test
Removed hacky workaround. Also now properly waits for the promise of the last APDU.
This commit is contained in:
1
tests/snapshots/nanox_erc721_transfer/00009.png
Symbolic link
1
tests/snapshots/nanox_erc721_transfer/00009.png
Symbolic link
@@ -0,0 +1 @@
|
||||
00007.png
|
||||
BIN
tests/snapshots/nanox_erc721_transfer/00010.png
Normal file
BIN
tests/snapshots/nanox_erc721_transfer/00010.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 382 B |
@@ -16,15 +16,10 @@ test('[Nano ' + model.letter + '] Transfer ERC-721', zemu(model, async (sim, eth
|
||||
await send_apdu(eth.transport, set_plugin);
|
||||
await send_apdu(eth.transport, provide_nft_info);
|
||||
await send_apdu(eth.transport, sign_first);
|
||||
send_apdu(eth.transport, sign_more);
|
||||
let sign_promise = send_apdu(eth.transport, sign_more);
|
||||
|
||||
await waitForAppScreen(sim, current_screen);
|
||||
// Go to the reject screen
|
||||
await sim.navigateAndCompareSnapshots('.', model.name + '_erc721_transfer', [8]);
|
||||
// Accepting the transaction somehow takes too long for Zemu and takes the same screenshot
|
||||
// twice, so accept it manually
|
||||
await sim.clickLeft();
|
||||
await sim.clickBoth();
|
||||
// Sleep so it has time to send the response APDU
|
||||
await Zemu.sleep(500);
|
||||
await sim.navigateAndCompareSnapshots('.', model.name + '_erc721_transfer', [8, -1, 0]);
|
||||
|
||||
await sign_promise;
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user