]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test toggling derivation path
authorIan Coleman <coleman.ian@gmail.com>
Wed, 24 Aug 2016 10:04:23 +0000 (20:04 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Wed, 24 Aug 2016 10:04:23 +0000 (20:04 +1000)
tests.js

index c9189a73268d6d890d6c8fba21cae3692ce5c68e..bb3c4fcaadf0ac23ad48e776bd3418d858293bd0 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -944,6 +944,32 @@ page.open(url, function(status) {
 },
 
 // Derivation path visibility can be toggled
+function() {
+page.open(url, function(status) {
+    // set the phrase
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability");
+        $(".phrase").trigger("input");
+    });
+    // check the path is not shown
+    waitForGenerate(function() {
+        // toggle path visibility
+        page.evaluate(function() {
+            $(".index-toggle").click();
+        });
+        // check the path is not visible
+        var isInvisible = page.evaluate(function() {
+            return $(".index:first span").hasClass("invisible");
+        });
+        if (!isInvisible) {
+            console.log("Toggled derivation path is visible");
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // Address is shown
 // Addresses are shown in order of derivation path
 // Address visibility can be toggled