diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2017-08-23 09:41:53 +1000 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2017-08-23 09:41:53 +1000 |
commit | 8a9f39137623a5ed364c3e8da7c1d770e63de7c6 (patch) | |
tree | 1072dca9503f1bbb93ad8aa9ec1245d63ba1174d | |
parent | e40acc3ab0e78ca3a9b63d0b1c9e16f804da104e (diff) | |
download | BIP39-8a9f39137623a5ed364c3e8da7c1d770e63de7c6.tar.gz BIP39-8a9f39137623a5ed364c3e8da7c1d770e63de7c6.tar.zst BIP39-8a9f39137623a5ed364c3e8da7c1d770e63de7c6.zip |
Test for Maza network
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -992,6 +992,36 @@ page.open(url, function(status) { | |||
992 | }); | 992 | }); |
993 | }, | 993 | }, |
994 | 994 | ||
995 | // Network can be set to maza | ||
996 | function() { | ||
997 | page.open(url, function(status) { | ||
998 | // set the phrase and coin | ||
999 | var expected = "MGW4Bmi2NEm4PxSjgeFwhP9vg18JHoRnfw"; | ||
1000 | page.evaluate(function() { | ||
1001 | $(".phrase").val("abandon abandon ability"); | ||
1002 | $(".phrase").trigger("input"); | ||
1003 | $(".network option[selected]").removeAttr("selected"); | ||
1004 | $(".network option").filter(function() { | ||
1005 | return $(this).html() == "MAZA - Maza"; | ||
1006 | }).prop("selected", true); | ||
1007 | $(".network").trigger("change"); | ||
1008 | }); | ||
1009 | // check the address is generated correctly | ||
1010 | waitForGenerate(function() { | ||
1011 | var actual = page.evaluate(function() { | ||
1012 | return $(".address:first").text(); | ||
1013 | }); | ||
1014 | if (actual != expected) { | ||
1015 | console.log("Maza address is incorrect"); | ||
1016 | console.log("Expected: " + expected); | ||
1017 | console.log("Actual: " + actual); | ||
1018 | fail(); | ||
1019 | } | ||
1020 | next(); | ||
1021 | }); | ||
1022 | }); | ||
1023 | }, | ||
1024 | |||
995 | // BIP39 seed is set from phrase | 1025 | // BIP39 seed is set from phrase |
996 | function() { | 1026 | function() { |
997 | page.open(url, function(status) { | 1027 | page.open(url, function(status) { |