]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Add myriadcoin test
authorIan Coleman <coleman.ian@gmail.com>
Mon, 7 Aug 2017 08:58:08 +0000 (18:58 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Mon, 7 Aug 2017 09:01:03 +0000 (19:01 +1000)
tests.js

index 2e2e38bc7ecd0d642f3da71da3ffb56cb7c4f094..4a67ed717e901472575ca73407bc0229da9b9b53 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -902,6 +902,36 @@ page.open(url, function(status) {
 });
 },
 
+// Network can be set to myriadcoin
+function() {
+page.open(url, function(status) {
+    // set the phrase and coin
+    var expected = "MJEswvRR46wh9BoiVj9DzKYMBkCramhoBV";
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability");
+        $(".phrase").trigger("input");
+        $(".network option[selected]").removeAttr("selected");
+        $(".network option").filter(function() {
+            return $(this).html() == "XMY - Myriadcoin";
+        }).prop("selected", true);
+        $(".network").trigger("change");
+    });
+    // check the address is generated correctly
+    waitForGenerate(function() {
+        var actual = page.evaluate(function() {
+            return $(".address:first").text();
+        });
+        if (actual != expected) {
+            console.log("Myriadcoin address is incorrect");
+            console.log("Expected: " + expected);
+            console.log("Actual: " + actual);
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // BIP39 seed is set from phrase
 function() {
 page.open(url, function(status) {