]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test private keys are shown in address table
authorIan Coleman <coleman.ian@gmail.com>
Fri, 26 Aug 2016 02:29:31 +0000 (12:29 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Fri, 26 Aug 2016 02:29:31 +0000 (12:29 +1000)
tests.js

index 6d24eccffec6f973eb92f391210f09805a8edccd..683af9b6149153e8380e70c37b050109c5deb808 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -1080,6 +1080,29 @@ page.open(url, function(status) {
 },
 
 // Private key is shown
+function() {
+page.open(url, function(status) {
+    var expected = "L26cVSpWFkJ6aQkPkKmTzLqTdLJ923e6CzrVh9cmx21QHsoUmrEE";
+    // set the phrase
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability").trigger("input");
+    });
+    // get the address
+    waitForGenerate(function() {
+        var actual = page.evaluate(function() {
+            return $(".privkey:first").text();
+        });
+        if (actual != expected) {
+            console.log("Private key is not shown");
+            console.log("Expected: " + expected);
+            console.log("Got: " + actual);
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // Private key visibility can be toggled
 
 // More addresses can be generated