diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2016-08-23 20:03:41 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2016-08-23 20:03:41 +1000 |
commit | 9eb72cdfcf76cd6f8b57409f322e3c4e83ffdeec (patch) | |
tree | 2c78d8db19a089e7950916bf9fb5e9ca9d7933ef /tests.js | |
parent | 06286adb0f27d33ed72189c326aeff7142cb73db (diff) | |
download | BIP39-9eb72cdfcf76cd6f8b57409f322e3c4e83ffdeec.tar.gz BIP39-9eb72cdfcf76cd6f8b57409f322e3c4e83ffdeec.tar.zst BIP39-9eb72cdfcf76cd6f8b57409f322e3c4e83ffdeec.zip |
Test BIP44 coin field
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 | ||