]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test toggling address visibility
authorIan Coleman <coleman.ian@gmail.com>
Fri, 26 Aug 2016 02:26:33 +0000 (12:26 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Fri, 26 Aug 2016 02:26:33 +0000 (12:26 +1000)
tests.js

index 12a6c5bf398de5d2d8360b9a92d10ba0d4d8097e..6d24eccffec6f973eb92f391210f09805a8edccd 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -978,7 +978,6 @@ page.open(url, function(status) {
         $(".phrase").val("abandon abandon ability");
         $(".phrase").trigger("input");
     });
-    // check the path is not shown
     waitForGenerate(function() {
         // toggle path visibility
         page.evaluate(function() {
@@ -1053,7 +1052,33 @@ page.open(url, function(status) {
     });
 });
 },
+
 // Address visibility can be toggled
+function() {
+page.open(url, function(status) {
+    // set the phrase
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability");
+        $(".phrase").trigger("input");
+    });
+    waitForGenerate(function() {
+        // toggle address visibility
+        page.evaluate(function() {
+            $(".address-toggle").click();
+        });
+        // check the address is not visible
+        var isInvisible = page.evaluate(function() {
+            return $(".address:first span").hasClass("invisible");
+        });
+        if (!isInvisible) {
+            console.log("Toggled address is visible");
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // Private key is shown
 // Private key visibility can be toggled