diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2017-10-03 14:40:56 +1100 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2017-10-03 14:40:56 +1100 |
commit | 4aa771eb68e326abf6cff2da6b416e9bd291d82e (patch) | |
tree | b568b2b639bb619faf0440d8f42a1c77b8d36b9c | |
parent | 1102f20135041833f22dfa4d45fa6d14a8592081 (diff) | |
download | BIP39-4aa771eb68e326abf6cff2da6b416e9bd291d82e.tar.gz BIP39-4aa771eb68e326abf6cff2da6b416e9bd291d82e.tar.zst BIP39-4aa771eb68e326abf6cff2da6b416e9bd291d82e.zip |
Add test for fujicoin
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -1022,6 +1022,36 @@ page.open(url, function(status) { | |||
1022 | }); | 1022 | }); |
1023 | }, | 1023 | }, |
1024 | 1024 | ||
1025 | // Network can be set to fujicoin | ||
1026 | function() { | ||
1027 | page.open(url, function(status) { | ||
1028 | // set the phrase and coin | ||
1029 | var expected = "FgiaLpG7C99DyR4WnPxXedRVHXSfKzUDhF"; | ||
1030 | page.evaluate(function() { | ||
1031 | $(".phrase").val("abandon abandon ability"); | ||
1032 | $(".phrase").trigger("input"); | ||
1033 | $(".network option[selected]").removeAttr("selected"); | ||
1034 | $(".network option").filter(function() { | ||
1035 | return $(this).html() == "FJC - Fujicoin"; | ||
1036 | }).prop("selected", true); | ||
1037 | $(".network").trigger("change"); | ||
1038 | }); | ||
1039 | // check the address is generated correctly | ||
1040 | waitForGenerate(function() { | ||
1041 | var actual = page.evaluate(function() { | ||
1042 | return $(".address:first").text(); | ||
1043 | }); | ||
1044 | if (actual != expected) { | ||
1045 | console.log("Fujicoin address is incorrect"); | ||
1046 | console.log("Expected: " + expected); | ||
1047 | console.log("Actual: " + actual); | ||
1048 | fail(); | ||
1049 | } | ||
1050 | next(); | ||
1051 | }); | ||
1052 | }); | ||
1053 | }, | ||
1054 | |||
1025 | // BIP39 seed is set from phrase | 1055 | // BIP39 seed is set from phrase |
1026 | function() { | 1056 | function() { |
1027 | page.open(url, function(status) { | 1057 | page.open(url, function(status) { |