diff options
-rw-r--r-- | tests.js | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -440,6 +440,31 @@ page.open(url, function(status) { | |||
440 | }, | 440 | }, |
441 | 441 | ||
442 | // BIP32 root key is set from phrase | 442 | // BIP32 root key is set from phrase |
443 | function() { | ||
444 | page.open(url, function(status) { | ||
445 | // set the phrase | ||
446 | var expected = "xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi"; | ||
447 | page.evaluate(function() { | ||
448 | $(".phrase").val("abandon abandon ability"); | ||
449 | $(".phrase").trigger("input"); | ||
450 | }); | ||
451 | // check the address is generated correctly | ||
452 | setTimeout(function() { | ||
453 | var actual = page.evaluate(function() { | ||
454 | return $(".root-key").val(); | ||
455 | }); | ||
456 | if (actual != expected) { | ||
457 | console.log("Root key is incorrectly generated from mnemonic"); | ||
458 | console.log("Expected: " + expected); | ||
459 | console.log("Actual: " + actual); | ||
460 | fail(); | ||
461 | } | ||
462 | next(); | ||
463 | }, 1000); | ||
464 | }); | ||
465 | }, | ||
466 | |||
467 | // TODO finish these tests | ||
443 | 468 | ||
444 | // Tabs show correct addresses when changed | 469 | // Tabs show correct addresses when changed |
445 | 470 | ||