diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2017-08-07 18:58:08 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2017-08-07 19:01:03 +1000 |
commit | c18511dd0d3d1dfeec6c3f84985f3fecc34f3f8e (patch) | |
tree | 2e544d3890e336ef96f7587f7febe3c1be37cfbe | |
parent | 7ebdf61c9977b66c83263d5ec0ced6a68eb9e3d9 (diff) | |
download | BIP39-c18511dd0d3d1dfeec6c3f84985f3fecc34f3f8e.tar.gz BIP39-c18511dd0d3d1dfeec6c3f84985f3fecc34f3f8e.tar.zst BIP39-c18511dd0d3d1dfeec6c3f84985f3fecc34f3f8e.zip |
Add myriadcoin test
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -902,6 +902,36 @@ page.open(url, function(status) { | |||
902 | }); | 902 | }); |
903 | }, | 903 | }, |
904 | 904 | ||
905 | // Network can be set to myriadcoin | ||
906 | function() { | ||
907 | page.open(url, function(status) { | ||
908 | // set the phrase and coin | ||
909 | var expected = "MJEswvRR46wh9BoiVj9DzKYMBkCramhoBV"; | ||
910 | page.evaluate(function() { | ||
911 | $(".phrase").val("abandon abandon ability"); | ||
912 | $(".phrase").trigger("input"); | ||
913 | $(".network option[selected]").removeAttr("selected"); | ||
914 | $(".network option").filter(function() { | ||
915 | return $(this).html() == "XMY - Myriadcoin"; | ||
916 | }).prop("selected", true); | ||
917 | $(".network").trigger("change"); | ||
918 | }); | ||
919 | // check the address is generated correctly | ||
920 | waitForGenerate(function() { | ||
921 | var actual = page.evaluate(function() { | ||
922 | return $(".address:first").text(); | ||
923 | }); | ||
924 | if (actual != expected) { | ||
925 | console.log("Myriadcoin address is incorrect"); | ||
926 | console.log("Expected: " + expected); | ||
927 | console.log("Actual: " + actual); | ||
928 | fail(); | ||
929 | } | ||
930 | next(); | ||
931 | }); | ||
932 | }); | ||
933 | }, | ||
934 | |||
905 | // BIP39 seed is set from phrase | 935 | // BIP39 seed is set from phrase |
906 | function() { | 936 | function() { |
907 | page.open(url, function(status) { | 937 | page.open(url, function(status) { |