aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-08-24 19:49:24 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-08-24 19:49:24 +1000
commit4974fd7f0024213a8b5af4ff569a2510e711e3b0 (patch)
treee7e67bc5471a224174cfb3e42b3febed6a1501df /tests.js
parent5f844c622fb0c133feb3472769c6ee5bd547c67b (diff)
downloadBIP39-4974fd7f0024213a8b5af4ff569a2510e711e3b0.tar.gz
BIP39-4974fd7f0024213a8b5af4ff569a2510e711e3b0.tar.zst
BIP39-4974fd7f0024213a8b5af4ff569a2510e711e3b0.zip
Test hardened addresses
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js37
1 files changed, 37 insertions, 0 deletions
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) {
906}, 906},
907 907
908// Derivation path for address can be hardened 908// Derivation path for address can be hardened
909function() {
910page.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