aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-09-03 15:35:58 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-09-03 15:35:58 +1000
commit8a89b9da97e437f9ce9476951896e51a9764800c (patch)
tree04de2380580e6abf98af63849072e5a183bbbcfc /tests.js
parent3563165943956529b9f35caa005db9f91a3d6c59 (diff)
downloadBIP39-8a89b9da97e437f9ce9476951896e51a9764800c.tar.gz
BIP39-8a89b9da97e437f9ce9476951896e51a9764800c.tar.zst
BIP39-8a89b9da97e437f9ce9476951896e51a9764800c.zip
Test custom number of additional 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 0c28ec8..124b6ce 100644
--- a/tests.js
+++ b/tests.js
@@ -1214,6 +1214,43 @@ page.open(url, function(status) {
1214}, 1214},
1215 1215
1216// A custom number of additional addresses can be generated 1216// A custom number of additional addresses can be generated
1217function() {
1218page.open(url, function(status) {
1219 // set the phrase
1220 page.evaluate(function() {
1221 $(".phrase").val("abandon abandon ability");
1222 $(".phrase").trigger("input");
1223 });
1224 waitForGenerate(function() {
1225 // get the current number of addresses
1226 var oldAddressCount = page.evaluate(function() {
1227 return $(".address").length;
1228 });
1229 // set a custom number of additional addresses
1230 page.evaluate(function() {
1231 $(".rows-to-add").val(1);
1232 });
1233 // generate more addresses
1234 page.evaluate(function() {
1235 $(".more").click();
1236 });
1237 waitForGenerate(function() {
1238 // check there are the correct number of addresses
1239 var newAddressCount = page.evaluate(function() {
1240 return $(".address").length;
1241 });
1242 if (newAddressCount - oldAddressCount != 1) {
1243 console.log("Number of additional addresses cannot be customized");
1244 console.log(newAddressCount)
1245 console.log(oldAddressCount)
1246 fail();
1247 }
1248 next();
1249 });
1250 });
1251});
1252},
1253
1217// Additional addresses are shown in order of derivation path 1254// Additional addresses are shown in order of derivation path
1218 1255
1219// BIP32 root key can be set by the user 1256// BIP32 root key can be set by the user