diff options
Diffstat (limited to 'tests.js')
-rw-r--r-- | tests.js | 33 |
1 files changed, 31 insertions, 2 deletions
@@ -646,9 +646,38 @@ page.open(url, function(status) { | |||
646 | }); | 646 | }); |
647 | }, | 647 | }, |
648 | 648 | ||
649 | // TODO finish these tests | ||
650 | |||
651 | // BIP44 coin field changes address list | 649 | // BIP44 coin field changes address list |
650 | function() { | ||
651 | page.open(url, function(status) { | ||
652 | // set the phrase | ||
653 | var expected = "1F6dB2djQYrxoyfZZmfr6D5voH8GkJTghk"; | ||
654 | page.evaluate(function() { | ||
655 | $(".phrase").val("abandon abandon ability"); | ||
656 | $(".phrase").trigger("input"); | ||
657 | }); | ||
658 | waitForGenerate(function() { | ||
659 | // change the bip44 purpose field to 45 | ||
660 | page.evaluate(function() { | ||
661 | $("#bip44 .coin").val("1"); | ||
662 | $("#bip44 .coin").trigger("input"); | ||
663 | }); | ||
664 | waitForGenerate(function() { | ||
665 | // check the address for the new derivation path | ||
666 | var actual = page.evaluate(function() { | ||
667 | return $(".address:first").text(); | ||
668 | }); | ||
669 | if (actual != expected) { | ||
670 | console.log("BIP44 coin field generates incorrect address"); | ||
671 | console.log("Expected: " + expected); | ||
672 | console.log("Actual: " + actual); | ||
673 | fail(); | ||
674 | } | ||
675 | next(); | ||
676 | }); | ||
677 | }); | ||
678 | }); | ||
679 | }, | ||
680 | |||
652 | // BIP44 account field changes address list | 681 | // BIP44 account field changes address list |
653 | // BIP44 external/internal field changes address list | 682 | // BIP44 external/internal field changes address list |
654 | 683 | ||