aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js68
1 files changed, 2 insertions, 66 deletions
diff --git a/tests.js b/tests.js
index 4f922ce..ea29043 100644
--- a/tests.js
+++ b/tests.js
@@ -1028,70 +1028,6 @@ page.open(url, function(status) {
1028}); 1028});
1029}, 1029},
1030 1030
1031// BIP44 purpose field changes address list
1032function() {
1033page.open(url, function(status) {
1034 // set the phrase
1035 var expected = "1JbDzRJ2cDT8aat2xwKd6Pb2zzavow5MhF";
1036 page.evaluate(function() {
1037 $(".phrase").val("abandon abandon ability");
1038 $(".phrase").trigger("input");
1039 });
1040 waitForGenerate(function() {
1041 // change the bip44 purpose field to 45
1042 page.evaluate(function() {
1043 $("#bip44 .purpose").val("45");
1044 $("#bip44 .purpose").trigger("input");
1045 });
1046 waitForGenerate(function() {
1047 // check the address for the new derivation path
1048 var actual = page.evaluate(function() {
1049 return $(".address:first").text();
1050 });
1051 if (actual != expected) {
1052 console.log("BIP44 purpose field generates incorrect address");
1053 console.log("Expected: " + expected);
1054 console.log("Actual: " + actual);
1055 fail();
1056 }
1057 next();
1058 });
1059 });
1060});
1061},
1062
1063// BIP44 coin field changes address list
1064function() {
1065page.open(url, function(status) {
1066 // set the phrase
1067 var expected = "1F6dB2djQYrxoyfZZmfr6D5voH8GkJTghk";
1068 page.evaluate(function() {
1069 $(".phrase").val("abandon abandon ability");
1070 $(".phrase").trigger("input");
1071 });
1072 waitForGenerate(function() {
1073 // change the bip44 purpose field to 45
1074 page.evaluate(function() {
1075 $("#bip44 .coin").val("1");
1076 $("#bip44 .coin").trigger("input");
1077 });
1078 waitForGenerate(function() {
1079 // check the address for the new derivation path
1080 var actual = page.evaluate(function() {
1081 return $(".address:first").text();
1082 });
1083 if (actual != expected) {
1084 console.log("BIP44 coin field generates incorrect address");
1085 console.log("Expected: " + expected);
1086 console.log("Actual: " + actual);
1087 fail();
1088 }
1089 next();
1090 });
1091 });
1092});
1093},
1094
1095// BIP44 account field changes address list 1031// BIP44 account field changes address list
1096function() { 1032function() {
1097page.open(url, function(status) { 1033page.open(url, function(status) {
@@ -3392,7 +3328,7 @@ page.open(url, function(status) {
3392 // check the BIP44 account extended private key 3328 // check the BIP44 account extended private key
3393 waitForGenerate(function() { 3329 waitForGenerate(function() {
3394 var actual = page.evaluate(function() { 3330 var actual = page.evaluate(function() {
3395 return $(".account-xprv").val(); 3331 return $("#bip44 .account-xprv").val();
3396 }); 3332 });
3397 if (actual != expected) { 3333 if (actual != expected) {
3398 console.log("BIP44 account extended private key is incorrect"); 3334 console.log("BIP44 account extended private key is incorrect");
@@ -3418,7 +3354,7 @@ page.open(url, function(status) {
3418 // check the BIP44 account extended public key 3354 // check the BIP44 account extended public key
3419 waitForGenerate(function() { 3355 waitForGenerate(function() {
3420 var actual = page.evaluate(function() { 3356 var actual = page.evaluate(function() {
3421 return $(".account-xpub").val(); 3357 return $("#bip44 .account-xpub").val();
3422 }); 3358 });
3423 if (actual != expected) { 3359 if (actual != expected) {
3424 console.log("BIP44 account extended public key is incorrect"); 3360 console.log("BIP44 account extended public key is incorrect");