From: Ian Coleman Date: Wed, 24 Aug 2016 09:49:24 +0000 (+1000) Subject: Test hardened addresses X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=4974fd7f0024213a8b5af4ff569a2510e711e3b0;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git Test hardened addresses --- 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