Updated chainid test

This commit is contained in:
Alexandre Paillier
2022-01-27 13:47:24 +01:00
parent 07e0d878e2
commit cb373dad68
37 changed files with 47 additions and 61 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 897 B

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 365 B

View File

@@ -1,71 +1,57 @@
import "core-js/stable";
import "regenerator-runtime/runtime";
import { waitForAppScreen, zemu } from './test.fixture';
import { waitForAppScreen, zemu, nano_models } from './test.fixture';
test('[Nano S] Transfer on network 112233445566 on Ethereum', zemu("nanos", async (sim, eth) => {
nano_models.forEach(function(model) {
test('[Nano ' + model.letter + '] Transfer on network 112233445566 on Ethereum', zemu(model, async (sim, eth) => {
const tx = eth.signTransaction(
"44'/60'/1'/0/0",
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf6181880851a21a278be8080',
);
const tx = eth.signTransaction(
"44'/60'/1'/0/0",
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf6181880851a21a278be8080',
);
await waitForAppScreen(sim);
await sim.navigateAndCompareSnapshots('.', 'nanos_transfer_112233445566_network', [9, 0]);
await waitForAppScreen(sim);
let clicks;
if (model.letter === 'S') clicks = [10];
else clicks = [6];
// Go to the reject screen
await sim.navigateAndCompareSnapshots('.', model.name + '_transfer_112233445566_network', clicks);
// 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();
await expect(tx).resolves.toEqual({
"r": "509981d8dfb66757e25ff47c009b9b5bc5db0f169473e4735f5212b144f1c069",
"s": "5db989d81025de3c846e41a9ce01a3f9fd0982e2d827f1b88ffc95d73a48d04c",
"v": "344344f19f",
});
}));
await expect(tx).resolves.toEqual({
"r": "509981d8dfb66757e25ff47c009b9b5bc5db0f169473e4735f5212b144f1c069",
"s": "5db989d81025de3c846e41a9ce01a3f9fd0982e2d827f1b88ffc95d73a48d04c",
"v": "344344f19f",
});
}));
});
test('[Nano S] Transfer on palm network on Ethereum', zemu("nanos", async (sim, eth) => {
nano_models.forEach(function(model) {
test('[Nano ' + model.letter + '] Transfer on palm network on Ethereum', zemu(model, async (sim, eth) => {
const tx = eth.signTransaction(
"44'/60'/1'/0/0",
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf61818808502a15c308d8080',
);
const tx = eth.signTransaction(
"44'/60'/1'/0/0",
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf61818808502a15c308d8080',
);
await waitForAppScreen(sim);
await sim.navigateAndCompareSnapshots('.', 'nanos_transfer_palm_network', [9, 0]);
await waitForAppScreen(sim);
let clicks;
if (model.letter === 'S') clicks = [10];
else clicks = [6];
// Go to the reject screen
await sim.navigateAndCompareSnapshots('.', model.name + '_transfer_palm_network', clicks);
// 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();
await expect(tx).resolves.toEqual({
"r": "946700c4972b3da24ddaa95e590ad25a8f905da62e2bd053285a4cc17f93f490",
"s": "3698e84564e58477a49f7a9cea572ef5d672a5538db08f3ee42df5eb75a1b907",
"v": "0542b8613d",
});
}));
test.skip('[Nano X] Transfer on network 112233445566 on Ethereum', zemu("nanox", async (sim, eth) => {
const tx = eth.signTransaction(
"44'/60'/1'/0/0",
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf6181880851a21a278be8080',
);
await waitForAppScreen(sim);
await sim.navigateAndCompareSnapshots('.', 'nanox_transfer_112233445566_network', [5, 0]);
await expect(tx).resolves.toEqual({
"r": "509981d8dfb66757e25ff47c009b9b5bc5db0f169473e4735f5212b144f1c069",
"s": "5db989d81025de3c846e41a9ce01a3f9fd0982e2d827f1b88ffc95d73a48d04c",
"v": "344344f19f",
});
}));
test.skip('[Nano X] Transfer on palm network on Ethereum', zemu("nanox", async (sim, eth) => {
const tx = eth.signTransaction(
"44'/60'/1'/0/0",
'f044850306dc4200825208945a321744667052affa8386ed49e00ef223cbffc3876f9c9e7bf61818808502a15c308d8080',
);
await waitForAppScreen(sim);
await sim.navigateAndCompareSnapshots('.', 'nanox_transfer_palm_network', [5, 0]);
await expect(tx).resolves.toEqual({
"r": "946700c4972b3da24ddaa95e590ad25a8f905da62e2bd053285a4cc17f93f490",
"s": "3698e84564e58477a49f7a9cea572ef5d672a5538db08f3ee42df5eb75a1b907",
"v": "0542b8613d",
});
}));
await expect(tx).resolves.toEqual({
"r": "946700c4972b3da24ddaa95e590ad25a8f905da62e2bd053285a4cc17f93f490",
"s": "3698e84564e58477a49f7a9cea572ef5d672a5538db08f3ee42df5eb75a1b907",
"v": "0542b8613d",
});
}));
});