]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/blobdiff - tests.js
Root key validity is checked before deriving
[perso/Immae/Projets/Cryptomonnaies/BIP39.git] / tests.js
index 19a371272c705a51c786a8ca10495ae57580c0cc..3cde75ff8aacd464670fe5217842e9f1ac8ecaa1 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -3241,6 +3241,30 @@ page.open(url, function(status) {
 });
 },
 
+// github issue 39
+// no root key shows feedback
+function() {
+page.open(url, function(status) {
+    // click the bip32 tab on fresh page
+    page.evaluate(function() {
+        $("#bip32-tab a").click();
+    });
+    waitForFeedback(function() {
+        // Check feedback is correct
+        var expected = "No root key";
+        var actual = page.evaluate(function() {
+            return $(".feedback").text();
+        });
+        if (actual != expected) {
+            console.log("Blank root key not detected");
+            console.log("Expected: " + expected);
+            console.log("Actual: " + actual);
+            fail();
+        }
+        next();
+    });
+});
+},
 
 // If you wish to add more tests, do so here...