]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test for Maza network
authorIan Coleman <coleman.ian@gmail.com>
Tue, 22 Aug 2017 23:41:53 +0000 (09:41 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Tue, 22 Aug 2017 23:41:53 +0000 (09:41 +1000)
tests.js

index 464a15dde87c535bce9b061aaf82419a07ae1062..1cf5b2204d573bf891095cceaa57f4eb0f83b48d 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -992,6 +992,36 @@ page.open(url, function(status) {
 });
 },
 
+// Network can be set to maza
+function() {
+page.open(url, function(status) {
+    // set the phrase and coin
+    var expected = "MGW4Bmi2NEm4PxSjgeFwhP9vg18JHoRnfw";
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability");
+        $(".phrase").trigger("input");
+        $(".network option[selected]").removeAttr("selected");
+        $(".network option").filter(function() {
+            return $(this).html() == "MAZA - Maza";
+        }).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("Maza 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) {