diff options
-rw-r--r-- | tests.js | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -1052,6 +1052,36 @@ page.open(url, function(status) { | |||
1052 | }); | 1052 | }); |
1053 | }, | 1053 | }, |
1054 | 1054 | ||
1055 | // Network can be set to nubits | ||
1056 | function() { | ||
1057 | page.open(url, function(status) { | ||
1058 | // set the phrase and coin | ||
1059 | var expected = "BLxkabXuZSJSdesLD7KxZdqovd4YwyBTU6"; | ||
1060 | page.evaluate(function() { | ||
1061 | $(".phrase").val("abandon abandon ability"); | ||
1062 | $(".phrase").trigger("input"); | ||
1063 | $(".network option[selected]").removeAttr("selected"); | ||
1064 | $(".network option").filter(function() { | ||
1065 | return $(this).html() == "USNBT - NuBits"; | ||
1066 | }).prop("selected", true); | ||
1067 | $(".network").trigger("change"); | ||
1068 | }); | ||
1069 | // check the address is generated correctly | ||
1070 | waitForGenerate(function() { | ||
1071 | var actual = page.evaluate(function() { | ||
1072 | return $(".address:first").text(); | ||
1073 | }); | ||
1074 | if (actual != expected) { | ||
1075 | console.log("NuBits address is incorrect"); | ||
1076 | console.log("Expected: " + expected); | ||
1077 | console.log("Actual: " + actual); | ||
1078 | fail(); | ||
1079 | } | ||
1080 | next(); | ||
1081 | }); | ||
1082 | }); | ||
1083 | }, | ||
1084 | |||
1055 | // BIP39 seed is set from phrase | 1085 | // BIP39 seed is set from phrase |
1056 | function() { | 1086 | function() { |
1057 | page.open(url, function(status) { | 1087 | page.open(url, function(status) { |