X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests.js;h=c9189a73268d6d890d6c8fba21cae3692ce5c68e;hb=4974fd7f0024213a8b5af4ff569a2510e711e3b0;hp=83c99d9a0c3729d88692c9e0c548161e35efe18d;hpb=5f844c622fb0c133feb3472769c6ee5bd547c67b;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/tests.js b/tests.js index 83c99d9..c9189a7 100644 --- a/tests.js +++ b/tests.js @@ -906,6 +906,43 @@ page.open(url, function(status) { }, // Derivation path for address can be hardened +function() { +page.open(url, function(status) { + // set the phrase + var expected = "18exLzUv7kfpiXRzmCjFDoC9qwNLFyvwyd"; + page.evaluate(function() { + $(".phrase").val("abandon abandon ability"); + $(".phrase").trigger("input"); + }); + // change tabs + waitForGenerate(function() { + page.evaluate(function() { + $("#bip32-tab a").click(); + }); + waitForGenerate(function() { + // select the hardened addresses option + page.evaluate(function() { + $(".hardened-addresses").prop("checked", true); + $(".hardened-addresses").trigger("change"); + }); + waitForGenerate(function() { + // check the generated address is hardened + var actual = page.evaluate(function() { + return $(".address:first").text(); + }); + if (actual != expected) { + console.log("Hardened address is incorrect"); + console.log("Expected: " + expected); + console.log("Actual: " + actual); + fail(); + } + next(); + }); + }); + }); +}); +}, + // Derivation path visibility can be toggled // Address is shown // Addresses are shown in order of derivation path