diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2016-08-24 19:49:24 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2016-08-24 19:49:24 +1000 |
commit | 4974fd7f0024213a8b5af4ff569a2510e711e3b0 (patch) | |
tree | e7e67bc5471a224174cfb3e42b3febed6a1501df | |
parent | 5f844c622fb0c133feb3472769c6ee5bd547c67b (diff) | |
download | BIP39-4974fd7f0024213a8b5af4ff569a2510e711e3b0.tar.gz BIP39-4974fd7f0024213a8b5af4ff569a2510e711e3b0.tar.zst BIP39-4974fd7f0024213a8b5af4ff569a2510e711e3b0.zip |
Test hardened addresses
-rw-r--r-- | tests.js | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -906,6 +906,43 @@ page.open(url, function(status) { | |||
906 | }, | 906 | }, |
907 | 907 | ||
908 | // Derivation path for address can be hardened | 908 | // Derivation path for address can be hardened |
909 | function() { | ||
910 | page.open(url, function(status) { | ||
911 | // set the phrase | ||
912 | var expected = "18exLzUv7kfpiXRzmCjFDoC9qwNLFyvwyd"; | ||
913 | page.evaluate(function() { | ||
914 | $(".phrase").val("abandon abandon ability"); | ||
915 | $(".phrase").trigger("input"); | ||
916 | }); | ||
917 | // change tabs | ||
918 | waitForGenerate(function() { | ||
919 | page.evaluate(function() { | ||
920 | $("#bip32-tab a").click(); | ||
921 | }); | ||
922 | waitForGenerate(function() { | ||
923 | // select the hardened addresses option | ||
924 | page.evaluate(function() { | ||
925 | $(".hardened-addresses").prop("checked", true); | ||
926 | $(".hardened-addresses").trigger("change"); | ||
927 | }); | ||
928 | waitForGenerate(function() { | ||
929 | // check the generated address is hardened | ||
930 | var actual = page.evaluate(function() { | ||
931 | return $(".address:first").text(); | ||
932 | }); | ||
933 | if (actual != expected) { | ||
934 | console.log("Hardened address is incorrect"); | ||
935 | console.log("Expected: " + expected); | ||
936 | console.log("Actual: " + actual); | ||
937 | fail(); | ||
938 | } | ||
939 | next(); | ||
940 | }); | ||
941 | }); | ||
942 | }); | ||
943 | }); | ||
944 | }, | ||
945 | |||
909 | // Derivation path visibility can be toggled | 946 | // Derivation path visibility can be toggled |
910 | // Address is shown | 947 | // Address is shown |
911 | // Addresses are shown in order of derivation path | 948 | // Addresses are shown in order of derivation path |